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

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dandandan committed Oct 22, 2021
1 parent d88b15f commit 1d1c00e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/compute/comparison/boolean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ pub fn lt_scalar(lhs: &BooleanArray, rhs: bool) -> BooleanArray {
if rhs {
compare_op_scalar(lhs, rhs, |a, _| !a)
} else {
lhs.clone()
BooleanArray::from_data(
DataType::Boolean,
Bitmap::new_zeroed(lhs.len()),
lhs.validity().cloned(),
)
}
}

Expand Down Expand Up @@ -298,12 +302,12 @@ mod tests {

#[test]
fn test_lt_eq_scalar_true() {
cmp_bool_scalar!(lt_scalar, &[false, true], true, &[true, true]);
cmp_bool_scalar!(lt_eq_scalar, &[false, true], true, &[true, true]);
}

#[test]
fn test_lt_eq_scalar_false() {
cmp_bool_scalar!(lt_scalar, &[false, true], false, &[true, false]);
cmp_bool_scalar!(lt_eq_scalar, &[false, true], false, &[true, false]);
}

#[test]
Expand Down

0 comments on commit 1d1c00e

Please sign in to comment.