File tree Expand file tree Collapse file tree 4 files changed +5
-29
lines changed
Expand file tree Collapse file tree 4 files changed +5
-29
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ use crate::optimizer::rules::ArrayReduceRule;
3030use crate :: optimizer:: rules:: ReduceRuleSet ;
3131
3232pub ( super ) const RULES : ReduceRuleSet < ScalarFnVTable > =
33- ReduceRuleSet :: new ( & [ & ScalarFnConstantRule , & ScalarFnAbstractReduceRule ] ) ;
33+ ReduceRuleSet :: new ( & [ & ScalarFnConstantRule , & ScalarFnAbstractReduceRule , ] ) ;
3434
3535#[ derive( Debug ) ]
3636struct ScalarFnConstantRule ;
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ use arrow_ord::cmp;
77use prost:: Message ;
88use vortex_compute:: arrow:: IntoArrow ;
99use vortex_compute:: arrow:: IntoVector ;
10+ use vortex_compute:: logical:: LogicalAndKleene ;
11+ use vortex_compute:: logical:: LogicalOrKleene ;
1012use vortex_dtype:: DType ;
1113use vortex_error:: VortexExpect ;
1214use vortex_error:: VortexResult ;
@@ -136,36 +138,10 @@ impl VTable for Binary {
136138
137139 match op {
138140 Operator :: And => {
139- // FIXME(ngates): implement logical compute over datums
140- let lhs = lhs
141- . unwrap_into_vector ( args. row_count )
142- . into_bool ( )
143- . into_arrow ( ) ?;
144- let rhs = rhs
145- . unwrap_into_vector ( args. row_count )
146- . into_bool ( )
147- . into_arrow ( ) ?;
148- return Ok ( Datum :: Vector (
149- arrow_arith:: boolean:: and_kleene ( & lhs, & rhs) ?
150- . into_vector ( ) ?
151- . into ( ) ,
152- ) ) ;
141+ return Ok ( LogicalAndKleene :: and_kleene ( & lhs. into_bool ( ) , & rhs. into_bool ( ) ) . into ( ) ) ;
153142 }
154143 Operator :: Or => {
155- // FIXME(ngates): implement logical compute over datums
156- let lhs = lhs
157- . unwrap_into_vector ( args. row_count )
158- . into_bool ( )
159- . into_arrow ( ) ?;
160- let rhs = rhs
161- . unwrap_into_vector ( args. row_count )
162- . into_bool ( )
163- . into_arrow ( ) ?;
164- return Ok ( Datum :: Vector (
165- arrow_arith:: boolean:: or_kleene ( & lhs, & rhs) ?
166- . into_vector ( ) ?
167- . into ( ) ,
168- ) ) ;
144+ return Ok ( LogicalOrKleene :: or_kleene ( & lhs. into_bool ( ) , & rhs. into_bool ( ) ) . into ( ) ) ;
169145 }
170146 _ => { }
171147 }
You can’t perform that action at this time.
0 commit comments