Skip to main content

ArrayBuiltins

Trait ArrayBuiltins 

Source
pub trait ArrayBuiltins: Sized {
    // Required methods
    fn cast(&self, dtype: DType) -> VortexResult<ArrayRef>;
    fn fill_null(&self, fill_value: impl Into<Scalar>) -> VortexResult<ArrayRef>;
    fn get_item(
        &self,
        field_name: impl Into<FieldName>,
    ) -> VortexResult<ArrayRef>;
    fn is_not_null(&self) -> VortexResult<ArrayRef>;
    fn mask(self, mask: ArrayRef) -> VortexResult<ArrayRef>;
    fn not(&self) -> VortexResult<ArrayRef>;
    fn interleave(
        &self,
        values: impl IntoIterator<Item = ArrayRef>,
        row_indices: ArrayRef,
    ) -> VortexResult<ArrayRef>;
    fn compare(
        &self,
        rhs: ArrayRef,
        op: CompareOperator,
    ) -> VortexResult<ArrayRef>;
    fn boolean(
        &self,
        rhs: ArrayRef,
        op: BooleanOperator,
    ) -> VortexResult<ArrayRef>;
    fn numeric(
        &self,
        rhs: ArrayRef,
        op: NumericOperator,
    ) -> VortexResult<ArrayRef>;
}
Expand description

A collection of built-in scalar functions that can be applied to expressions or arrays.

Required Methods§

Source

fn cast(&self, dtype: DType) -> VortexResult<ArrayRef>

Cast to the given data type.

Source

fn fill_null(&self, fill_value: impl Into<Scalar>) -> VortexResult<ArrayRef>

Replace null values with the given fill value.

Source

fn get_item(&self, field_name: impl Into<FieldName>) -> VortexResult<ArrayRef>

Get item by field name (for struct types).

Source

fn is_not_null(&self) -> VortexResult<ArrayRef>

Is not null check.

Source

fn mask(self, mask: ArrayRef) -> VortexResult<ArrayRef>

Mask the array using the given boolean mask. The resulting array’s validity is the intersection of the original array’s validity and the mask’s validity.

Source

fn not(&self) -> VortexResult<ArrayRef>

Boolean negation.

Source

fn interleave( &self, values: impl IntoIterator<Item = ArrayRef>, row_indices: ArrayRef, ) -> VortexResult<ArrayRef>

Random-access gather by (array_index, row_index): output row i is taken from values[array_indices[i]][row_indices[i]], where self is the (non-nullable) array_indices selector and row_indices names the position within the selected value. See InterleaveArray.

Source

fn compare(&self, rhs: ArrayRef, op: CompareOperator) -> VortexResult<ArrayRef>

Compare this array with another.

Source

fn boolean(&self, rhs: ArrayRef, op: BooleanOperator) -> VortexResult<ArrayRef>

Apply a Kleene boolean operator to this array and another.

Source

fn numeric(&self, rhs: ArrayRef, op: NumericOperator) -> VortexResult<ArrayRef>

Apply an arithmetic operator to this array and another.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§