Skip to content

Commit

Permalink
Add some more
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Nov 6, 2024
1 parent 320d5cd commit 9f4f4c2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/polars-ops/src/series/ops/replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,11 @@ fn create_replacer(mut old: Series, mut new: Series, add_mask: bool) -> PolarsRe

let len = old.len();
let cols = if add_mask {
// @scalar-opt
let mask = Column::new(PlSmallStr::from_static("__POLARS_REPLACE_MASK"), &[true])
.new_from_index(0, new.len());
let mask = Column::new_scalar(
PlSmallStr::from_static("__POLARS_REPLACE_MASK"),
true.into(),
new.len(),
);
vec![old.into(), new.into(), mask]
} else {
vec![old.into(), new.into()]
Expand Down

0 comments on commit 9f4f4c2

Please sign in to comment.