DynVTable

Trait DynVTable 

Source
pub trait DynVTable:
    'static
    + Sealed
    + Send
    + Sync
    + Debug {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn id(&self) -> ArrayId;
    fn build(
        &self,
        dtype: &DType,
        len: usize,
        metadata: &[u8],
        buffers: &[BufferHandle],
        children: &dyn ArrayChildren,
    ) -> VortexResult<ArrayRef>;
    fn with_children(
        &self,
        array: &dyn Array,
        children: Vec<ArrayRef>,
    ) -> VortexResult<ArrayRef>;
    fn encode(
        &self,
        input: &Canonical,
        like: Option<&dyn Array>,
    ) -> VortexResult<Option<ArrayRef>>;
    fn reduce(&self, array: &ArrayRef) -> VortexResult<Option<ArrayRef>>;
    fn reduce_parent(
        &self,
        array: &ArrayRef,
        parent: &ArrayRef,
        child_idx: usize,
    ) -> VortexResult<Option<ArrayRef>>;
    fn execute(
        &self,
        array: &ArrayRef,
        ctx: &mut ExecutionCtx,
    ) -> VortexResult<Vector>;
    fn execute_parent(
        &self,
        array: &ArrayRef,
        parent: &ArrayRef,
        child_idx: usize,
        ctx: &mut ExecutionCtx,
    ) -> VortexResult<Option<Vector>>;
}
Expand description

Dynamically typed trait for invoking array vtables.

This trait contains the internal API for Vortex arrays, allowing us to expose things here that we do not want to be part of the public Array trait.

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn id(&self) -> ArrayId

Source

fn build( &self, dtype: &DType, len: usize, metadata: &[u8], buffers: &[BufferHandle], children: &dyn ArrayChildren, ) -> VortexResult<ArrayRef>

Source

fn with_children( &self, array: &dyn Array, children: Vec<ArrayRef>, ) -> VortexResult<ArrayRef>

Source

fn encode( &self, input: &Canonical, like: Option<&dyn Array>, ) -> VortexResult<Option<ArrayRef>>

Source

fn reduce(&self, array: &ArrayRef) -> VortexResult<Option<ArrayRef>>

Source

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

Source

fn execute( &self, array: &ArrayRef, ctx: &mut ExecutionCtx, ) -> VortexResult<Vector>

Source

fn execute_parent( &self, array: &ArrayRef, parent: &ArrayRef, child_idx: usize, ctx: &mut ExecutionCtx, ) -> VortexResult<Option<Vector>>

Implementors§