Skip to content

Commit a82a7ea

Browse files
committed
is-null
Signed-off-by: Joe Isaacs <[email protected]>
1 parent fc2c05e commit a82a7ea

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

vortex-array/src/expr/exprs/is_null.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,33 @@ use std::ops::Not;
66

77
use vortex_dtype::DType;
88
use vortex_dtype::Nullability;
9-
use vortex_error::vortex_bail;
109
use vortex_error::VortexExpect;
1110
use vortex_error::VortexResult;
11+
use vortex_error::vortex_bail;
1212
use vortex_mask::Mask;
13-
use vortex_vector::bool::BoolVector;
1413
use vortex_vector::Vector;
1514
use vortex_vector::VectorOps;
15+
use vortex_vector::bool::BoolVector;
1616

17+
use crate::Array;
18+
use crate::ArrayRef;
19+
use crate::IntoArray;
1720
use crate::arrays::BoolArray;
1821
use crate::arrays::ConstantArray;
19-
use crate::expr::exprs::binary::eq;
20-
use crate::expr::exprs::literal::lit;
21-
use crate::expr::functions::EmptyOptions;
22-
use crate::expr::stats::Stat;
22+
use crate::expr::ChildName;
2323
use crate::expr::ExecutionArgs;
2424
use crate::expr::ExprId;
2525
use crate::expr::Expression;
2626
use crate::expr::ExpressionView;
27+
use crate::expr::ScalarFnExprExt;
2728
use crate::expr::StatsCatalog;
2829
use crate::expr::VTable;
2930
use crate::expr::VTableExt;
30-
use crate::expr::{ChildName, ScalarFnExprExt};
31+
use crate::expr::exprs::binary::eq;
32+
use crate::expr::exprs::literal::lit;
33+
use crate::expr::functions::EmptyOptions;
34+
use crate::expr::stats::Stat;
3135
use crate::scalar_fns::is_null;
32-
use crate::Array;
33-
use crate::ArrayRef;
34-
use crate::IntoArray;
3536

3637
/// Expression that checks for null values.
3738
pub struct IsNull;
@@ -144,6 +145,7 @@ mod tests {
144145
use vortex_utils::aliases::hash_set::HashSet;
145146

146147
use super::is_null;
148+
use crate::IntoArray;
147149
use crate::arrays::PrimitiveArray;
148150
use crate::arrays::StructArray;
149151
use crate::expr::exprs::binary::eq;
@@ -154,7 +156,6 @@ mod tests {
154156
use crate::expr::pruning::checked_pruning_expr;
155157
use crate::expr::stats::Stat;
156158
use crate::expr::test_harness;
157-
use crate::IntoArray;
158159

159160
#[test]
160161
fn dtype() {

vortex-array/src/scalar_fns/is_null/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ use vortex_dtype::DType;
55
use vortex_dtype::Nullability::NonNullable;
66
use vortex_error::VortexResult;
77
use vortex_mask::Mask;
8-
use vortex_vector::bool::BoolVector;
98
use vortex_vector::Datum;
109
use vortex_vector::ScalarOps;
1110
use vortex_vector::Vector;
1211
use vortex_vector::VectorOps;
12+
use vortex_vector::bool::BoolVector;
1313

14+
use crate::expr::ChildName;
15+
use crate::expr::ExprId;
1416
use crate::expr::functions::ArgName;
1517
use crate::expr::functions::Arity;
1618
use crate::expr::functions::EmptyOptions;
1719
use crate::expr::functions::ExecutionArgs;
1820
use crate::expr::functions::VTable;
19-
use crate::expr::ChildName;
20-
use crate::expr::ExprId;
2121

2222
pub struct IsNull;
2323
impl VTable for IsNull {
@@ -48,7 +48,8 @@ impl VTable for IsNull {
4848
Datum::Vector(vec) => Vector::Bool(BoolVector::new(
4949
vec.validity().to_bit_buffer(),
5050
Mask::AllTrue(vec.len()),
51-
)).into()
51+
))
52+
.into(),
5253
})
5354
}
5455
}

vortex-vector/src/bool/scalar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ impl From<bool> for Scalar {
4848
fn from(value: bool) -> Self {
4949
BoolScalar::new(Some(value)).into()
5050
}
51-
}
51+
}

0 commit comments

Comments
 (0)