ArrayOperator

Trait ArrayOperator 

Source
pub trait ArrayOperator:
    'static
    + Send
    + Sync {
    // Required methods
    fn execute_batch(
        &self,
        selection: &Mask,
        ctx: &mut dyn ExecutionCtx,
    ) -> VortexResult<Vector>;
    fn reduce_children(&self) -> VortexResult<Option<ArrayRef>>;
    fn reduce_parent(
        &self,
        parent: &ArrayRef,
        child_idx: usize,
    ) -> VortexResult<Option<ArrayRef>>;
    fn as_pipelined(&self) -> Option<&dyn PipelinedNode>;
    fn bind(
        &self,
        selection: Option<&ArrayRef>,
        ctx: &mut dyn BindCtx,
    ) -> VortexResult<BatchKernelRef>;
}
Expand description

Array functions as provided by the OperatorVTable.

Note: the public functions such as “execute” should move onto the main Array trait when operators is stabilized. The other functions should remain on a pub(crate) trait.

Required Methods§

Source

fn execute_batch( &self, selection: &Mask, ctx: &mut dyn ExecutionCtx, ) -> VortexResult<Vector>

Execute the array’s batch kernel with the given selection mask.

§Panics

If the mask length does not match the array length. If the array’s implementation returns an invalid vector (wrong length, wrong type, etc.).

Source

fn reduce_children(&self) -> VortexResult<Option<ArrayRef>>

Optimize the array by running the optimization rules.

Source

fn reduce_parent( &self, parent: &ArrayRef, child_idx: usize, ) -> VortexResult<Option<ArrayRef>>

Optimize the array by pushing down a parent array.

Source

fn as_pipelined(&self) -> Option<&dyn PipelinedNode>

Returns the array as a pipeline node, if supported.

Source

fn bind( &self, selection: Option<&ArrayRef>, ctx: &mut dyn BindCtx, ) -> VortexResult<BatchKernelRef>

Bind the array to a batch kernel. This is an internal function

Implementations on Foreign Types§

Source§

impl ArrayOperator for Arc<dyn Array>

Source§

fn execute_batch( &self, selection: &Mask, ctx: &mut dyn ExecutionCtx, ) -> VortexResult<Vector>

Source§

fn reduce_children(&self) -> VortexResult<Option<ArrayRef>>

Source§

fn reduce_parent( &self, parent: &ArrayRef, child_idx: usize, ) -> VortexResult<Option<ArrayRef>>

Source§

fn as_pipelined(&self) -> Option<&dyn PipelinedNode>

Source§

fn bind( &self, selection: Option<&ArrayRef>, ctx: &mut dyn BindCtx, ) -> VortexResult<BatchKernelRef>

Implementors§