@@ -12,29 +12,16 @@ use crate::Array;
1212use crate :: ArrayRef ;
1313use crate :: arrays:: ConstantVTable ;
1414use crate :: kernel:: BindCtx ;
15- use crate :: session:: ArraySessionExt ;
1615
1716/// Executor for exporting a Vortex [`Vector`] or [`Datum`] from an [`ArrayRef`].
1817pub trait VectorExecutor {
19- /// Execute the array and return the resulting datum after running the optimizer.
20- fn execute_datum_optimized ( & self , session : & VortexSession ) -> VortexResult < Datum > ;
2118 /// Execute the array and return the resulting datum.
2219 fn execute_datum ( & self , session : & VortexSession ) -> VortexResult < Datum > ;
23- /// Execute the array and return the resulting vector after running the optimizer.
24- fn execute_vector_optimized ( & self , session : & VortexSession ) -> VortexResult < Vector > ;
2520 /// Execute the array and return the resulting vector.
2621 fn execute_vector ( & self , session : & VortexSession ) -> VortexResult < Vector > ;
2722}
2823
2924impl VectorExecutor for ArrayRef {
30- fn execute_datum_optimized ( & self , session : & VortexSession ) -> VortexResult < Datum > {
31- session
32- . arrays ( )
33- . optimizer ( )
34- . optimize_array ( self ) ?
35- . execute_datum ( session)
36- }
37-
3825 fn execute_datum ( & self , session : & VortexSession ) -> VortexResult < Datum > {
3926 // Attempt to short-circuit constant arrays.
4027 if let Some ( constant) = self . as_opt :: < ConstantVTable > ( ) {
@@ -66,14 +53,6 @@ impl VectorExecutor for ArrayRef {
6653 Ok ( Datum :: Vector ( result) )
6754 }
6855
69- fn execute_vector_optimized ( & self , session : & VortexSession ) -> VortexResult < Vector > {
70- session
71- . arrays ( )
72- . optimizer ( )
73- . optimize_array ( self ) ?
74- . execute_vector ( session)
75- }
76-
7756 fn execute_vector ( & self , session : & VortexSession ) -> VortexResult < Vector > {
7857 let len = self . len ( ) ;
7958 Ok ( self . execute_datum ( session) ?. ensure_vector ( len) )
0 commit comments