@@ -5,21 +5,19 @@ use vortex_dtype::DType;
55use vortex_dtype:: Nullability :: NonNullable ;
66use vortex_error:: VortexResult ;
77use vortex_mask:: Mask ;
8+ use vortex_vector:: bool:: BoolVector ;
89use vortex_vector:: Datum ;
9- use vortex_vector:: Scalar ;
1010use vortex_vector:: ScalarOps ;
1111use vortex_vector:: Vector ;
1212use vortex_vector:: VectorOps ;
13- use vortex_vector:: bool:: BoolScalar ;
14- use vortex_vector:: bool:: BoolVector ;
1513
16- use crate :: expr:: ChildName ;
17- use crate :: expr:: ExprId ;
1814use crate :: expr:: functions:: ArgName ;
1915use crate :: expr:: functions:: Arity ;
2016use crate :: expr:: functions:: EmptyOptions ;
2117use crate :: expr:: functions:: ExecutionArgs ;
2218use crate :: expr:: functions:: VTable ;
19+ use crate :: expr:: ChildName ;
20+ use crate :: expr:: ExprId ;
2321
2422pub struct IsNull ;
2523impl VTable for IsNull {
@@ -45,14 +43,12 @@ impl VTable for IsNull {
4543 }
4644
4745 fn execute ( & self , _: & Self :: Options , args : & ExecutionArgs ) -> VortexResult < Datum > {
48- Ok ( args. input_datums ( 0 ) . as_ref ( ) . map2 (
49- |sc| sc. is_invalid ( ) . into ( ) ,
50- |arr| {
51- Vector :: Bool ( BoolVector :: new (
52- arr. validity ( ) . to_bit_buffer ( ) ,
53- Mask :: AllTrue ( arr. len ( ) ) ,
54- ) )
55- } ,
56- ) )
46+ Ok ( match args. input_datums ( 0 ) {
47+ Datum :: Scalar ( sc) => Datum :: Scalar ( sc. is_invalid ( ) . into ( ) ) ,
48+ Datum :: Vector ( vec) => Vector :: Bool ( BoolVector :: new (
49+ vec. validity ( ) . to_bit_buffer ( ) ,
50+ Mask :: AllTrue ( vec. len ( ) ) ,
51+ ) ) . into ( )
52+ } )
5753 }
5854}
0 commit comments