Skip to main content

DynVTable

Trait DynVTable 

Source
pub trait DynVTable:
    'static
    + Sealed
    + Send
    + Sync
    + Debug {
    // Required methods
    fn build(
        &self,
        id: ArrayId,
        dtype: &DType,
        len: usize,
        metadata: &[u8],
        buffers: &[BufferHandle],
        children: &dyn ArrayChildren,
        session: &VortexSession,
    ) -> VortexResult<ArrayRef>;
    fn with_children(
        &self,
        array: &dyn Array,
        children: Vec<ArrayRef>,
    ) -> VortexResult<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<ArrayRef>;
    fn execute_parent(
        &self,
        array: &ArrayRef,
        parent: &ArrayRef,
        child_idx: usize,
        ctx: &mut ExecutionCtx,
    ) -> VortexResult<Option<ArrayRef>>;
}
Expand description

Dynamically typed vtable trait.

This trait is sealed, therefore users should implement the strongly typed VTable trait instead. The ArrayVTableExt::vtable function can be used to lift the implementation into this object-safe form.

This trait contains the implementation API for Vortex arrays, allowing us to keep the public Array trait API to a minimum.

Required Methods§

Source

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

Source

fn with_children( &self, array: &dyn Array, children: Vec<ArrayRef>, ) -> VortexResult<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<ArrayRef>

Source

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

Trait Implementations§

Source§

impl<V: VTable> From<V> for &'static dyn DynVTable

Source§

fn from(_vtable: V) -> Self

Converts to this type from the input type.

Implementors§