File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,9 +9,7 @@ use vortex_error::VortexExpect;
99use vortex_error:: VortexResult ;
1010
1111use crate :: ArrayRef ;
12- use crate :: Canonical ;
1312use crate :: IntoArray ;
14- use crate :: LEGACY_SESSION ;
1513use crate :: VortexSessionExecute ;
1614use crate :: array:: ArrayView ;
1715use crate :: arrays:: Constant ;
@@ -36,7 +34,6 @@ use crate::validity::Validity;
3634
3735pub ( super ) const RULES : ReduceRuleSet < ScalarFnVTable > = ReduceRuleSet :: new ( & [
3836 & ScalarFnPackToStructRule ,
39- & ScalarFnConstantRule ,
4037 & ScalarFnAbstractReduceRule ,
4138] ) ;
4239
@@ -71,24 +68,6 @@ impl ArrayReduceRule<ScalarFnVTable> for ScalarFnPackToStructRule {
7168 }
7269}
7370
74- #[ derive( Debug ) ]
75- struct ScalarFnConstantRule ;
76- impl ArrayReduceRule < ScalarFnVTable > for ScalarFnConstantRule {
77- fn reduce ( & self , array : ArrayView < ' _ , ScalarFnVTable > ) -> VortexResult < Option < ArrayRef > > {
78- if !array. children ( ) . iter ( ) . all ( |c| c. is :: < Constant > ( ) ) {
79- return Ok ( None ) ;
80- }
81- if array. is_empty ( ) {
82- Ok ( Some ( Canonical :: empty ( array. dtype ( ) ) . into_array ( ) ) )
83- } else {
84- let result = array
85- . array ( )
86- . execute_scalar ( 0 , & mut LEGACY_SESSION . create_execution_ctx ( ) ) ?;
87- Ok ( Some ( ConstantArray :: new ( result, array. len ( ) ) . into_array ( ) ) )
88- }
89- }
90- }
91-
9271#[ derive( Debug ) ]
9372struct ScalarFnSliceReduceRule ;
9473impl ArrayParentReduceRule < ScalarFnVTable > for ScalarFnSliceReduceRule {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ use vortex_error::vortex_bail;
1313use vortex_proto:: expr as pb;
1414use vortex_session:: VortexSession ;
1515
16- use crate :: ArrayRef ;
16+ use crate :: { ArrayRef , Columnar } ;
1717use crate :: Canonical ;
1818use crate :: ExecutionCtx ;
1919use crate :: IntoArray ;
You can’t perform that action at this time.
0 commit comments