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 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.

Source§

impl Executable for CanonicalValidity

Source§

impl Executable for RecursiveCanonical

Source§

impl Executable for ArrayRef

Executing an ArrayRef into an ArrayRef is the atomic execution loop within Vortex.

It attempts to take the smallest possible step of execution such that the returned array is incrementally more “executed” than the input array. In other words, it is closer to becoming a canonical array.

The execution steps are as follows: 0. Check for canonical.

  1. Attempt to reduce the array with metadata-only optimizations.
  2. Attempt to call reduce_parent on each child.
  3. Attempt to call execute_parent on each child.
  4. Call execute on the array itself (which returns an ExecutionStep).

Most users will not call this method directly, instead preferring to specify an executable target such as crate::Columnar, Canonical, or any of the canonical array types (such as crate::arrays::PrimitiveArray).