22// SPDX-FileCopyrightText: Copyright the Vortex contributors
33
44use vortex_error:: { VortexResult , vortex_bail} ;
5- use vortex_vector:: Vector ;
65
76use crate :: ArrayRef ;
8- use crate :: execution:: { BatchKernelRef , BindCtx , ExecutionCtx } ;
7+ use crate :: execution:: { BatchKernelRef , BindCtx } ;
98use crate :: pipeline:: PipelinedNode ;
109use crate :: vtable:: { NotSupported , VTable } ;
1110
@@ -15,25 +14,6 @@ use crate::vtable::{NotSupported, VTable};
1514///
1615/// See <https://github.com/vortex-data/vortex/pull/4726> for the operators RFC.
1716pub trait OperatorVTable < V : VTable > {
18- /// Returns a canonical [`Vector`].
19- ///
20- /// The returned vector must be the appropriate one for the array's logical type (they are
21- /// one-to-one with Vortex `DType`s), and should respect the output nullability of the array.
22- ///
23- /// Debug builds will panic if the returned vector is of the wrong type, wrong length, or
24- /// incorrectly contains null values.
25- ///
26- /// Implementations should recursively call [`crate::ArrayOperator::execute_batch`] on child
27- /// arrays as needed.
28- // NOTE(ngates): in the future, we will add pipeline_execute to process chunks of 1k rows at
29- // a time.
30- // TODO(ngates): we should fix array vtables such that we can take the array by ownership. This
31- // allows for more efficient in-place compute, as well as avoids allocating additional memory
32- // if the array's own memory can be reused by some reasonable allocator.
33- fn execute_batch ( array : & V :: Array , _ctx : & mut dyn ExecutionCtx ) -> VortexResult < Vector > {
34- Self :: bind ( array, None , & mut ( ) ) ?. execute ( )
35- }
36-
3717 /// Downcast this array into a [`PipelinedNode`] if it supports pipelined execution.
3818 ///
3919 /// Each node is either a source node or a transformation node.
0 commit comments