Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Replace Bitmap::from_trusted_len_iter with Bitmap::new_zeroed in …
Browse files Browse the repository at this point in the history
…`and_scalar` when scalar value is false.
  • Loading branch information
silathdiir committed Dec 25, 2021
1 parent 958f3a9 commit 4dfbe3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compute/boolean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub fn and_scalar(array: &BooleanArray, scalar: &BooleanScalar) -> BooleanArray
match scalar.value() {
Some(true) => array.clone(),
Some(false) => {
let values = Bitmap::from_trusted_len_iter(std::iter::repeat(false).take(array.len()));
let values = Bitmap::new_zeroed(array.len());
BooleanArray::from_data(DataType::Boolean, values, array.validity().cloned())
}
None => BooleanArray::new_null(DataType::Boolean, array.len()),
Expand Down

0 comments on commit 4dfbe3f

Please sign in to comment.