@@ -8,6 +8,7 @@ use std::fmt::Formatter;
88
99pub use kernel:: * ;
1010use prost:: Message ;
11+ use vortex_array:: expr:: and;
1112use vortex_error:: VortexResult ;
1213use vortex_error:: vortex_bail;
1314use vortex_proto:: expr as pb;
@@ -308,9 +309,18 @@ impl ScalarFnVTable for Between {
308309 let lhs = Binary . new_expr ( options. lower_strict . to_operator ( ) , [ lower, arr. clone ( ) ] ) ;
309310 let rhs = Binary . new_expr ( options. upper_strict . to_operator ( ) , [ arr, upper] ) ;
310311
311- Binary
312- . new_expr ( Operator :: And , [ lhs, rhs] )
313- . stat_falsification ( catalog)
312+ and ( lhs, rhs) . stat_falsification ( catalog)
313+ }
314+
315+ fn validity (
316+ & self ,
317+ _options : & Self :: Options ,
318+ expression : & Expression ,
319+ ) -> VortexResult < Option < Expression > > {
320+ let arr = expression. child ( 0 ) . validity ( ) ?;
321+ let lower = expression. child ( 1 ) . validity ( ) ?;
322+ let upper = expression. child ( 2 ) . validity ( ) ?;
323+ Ok ( Some ( and ( and ( arr, lower) , upper) ) )
314324 }
315325
316326 fn is_null_sensitive ( & self , _instance : & Self :: Options ) -> bool {
0 commit comments