Skip to main content

Executable

Trait Executable 

Source
pub trait Executable: Sized {
    // Required method
    fn execute(array: ArrayRef, ctx: &mut ExecutionCtx) -> VortexResult<Self>;
}
Expand description

Marker trait for types that an ArrayRef can be executed into.

Implementors must provide an implementation of execute that takes an ArrayRef and an ExecutionCtx, and produces an instance of the implementor type.

Users should use the Array::execute or Array::execute_as methods

Required Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Executable for Mask

Source§

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

Source§

impl Executable for BitBuffer

Execute the array to a BitBuffer, aka a non-nullable BoolArray.

This will panic if the array’s dtype is not non-nullable bool.

Source§

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

Source§

impl<T: NativePType> Executable for Buffer<T>

Execute a primitive typed array into a buffer of native values, assuming all values are valid.

§Errors

Returns a VortexError if the array is not all-valid (has any nulls).

Source§

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

Implementors§

Source§

impl Executable for Canonical

Execute into Canonical by running execute_until with the AnyCanonical matcher.

Unlike executing into crate::Columnar, this will fully expand constant arrays into their canonical form. Callers should prefer to execute into Columnar if they are able to optimize their use for constant arrays.

Source§

impl Executable for Columnar

Execute into Columnar by running execute_until with the AnyColumnar matcher.

Source§

impl Executable for ArrayRef

Single-step execution: takes one step toward canonical form.

Steps through reduce, reduce_parent, execute_parent, then execute. For ExecuteSlot, only a single child execution step is performed — the child is executed once and put back, making this a lightweight, bounded operation.

However, if execute_step returns ExecutionStep::AppendChild, this implementation drives the entire array to completion via execute_into_builder in a single call. This can do substantially more work than a normal step because it creates a builder and fully decodes the array into that builder before returning. Callers should be aware that a single .execute::<ArrayRef>(ctx) call may perform O(n_children * decode_cost) work when AppendChild is returned.

Source§

impl Executable for CanonicalValidity

Source§

impl Executable for RecursiveCanonical

Source§

impl Executable for BoolArray

Execute the array to canonical form and unwrap as a BoolArray.

This will panic if the array’s dtype is not bool.

Source§

impl Executable for DecimalArray

Execute the array to canonical form and unwrap as a DecimalArray.

This will panic if the array’s dtype is not decimal.

Source§

impl Executable for ExtensionArray

Execute the array to canonical form and unwrap as an ExtensionArray.

This will panic if the array’s dtype is not an extension type.

Source§

impl Executable for FixedSizeListArray

Execute the array to canonical form and unwrap as a FixedSizeListArray.

This will panic if the array’s dtype is not fixed size list.

Source§

impl Executable for ListViewArray

Execute the array to canonical form and unwrap as a ListViewArray.

This will panic if the array’s dtype is not list.

Source§

impl Executable for NullArray

Execute the array to canonical form and unwrap as a NullArray.

This will panic if the array’s dtype is not null.

Source§

impl Executable for PrimitiveArray

Execute the array to canonical form and unwrap as a PrimitiveArray.

This will panic if the array’s dtype is not primitive.

Source§

impl Executable for StructArray

Execute the array to canonical form and unwrap as a StructArray.

This will panic if the array’s dtype is not struct.

Source§

impl Executable for VarBinViewArray

Execute the array to canonical form and unwrap as a VarBinViewArray.

This will panic if the array’s dtype is not utf8 or binary.