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_null(&self) -> VortexResult<ArrayRef>;
    fn mask(self, mask: ArrayRef) -> VortexResult<ArrayRef>;
    fn not(&self) -> VortexResult<ArrayRef>;
    fn zip(&self, if_false: ArrayRef, mask: ArrayRef) -> VortexResult<ArrayRef>;
    fn between(
        self,
        lower: ArrayRef,
        upper: ArrayRef,
        options: BetweenOptions,
    ) -> VortexResult<ArrayRef>;
}

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_null(&self) -> VortexResult<ArrayRef>

Is 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 zip(&self, if_false: ArrayRef, mask: ArrayRef) -> VortexResult<ArrayRef>

Conditional selection: result[i] = if mask[i] then self[i] else if_false[i].

Source

fn between( self, lower: ArrayRef, upper: ArrayRef, options: BetweenOptions, ) -> VortexResult<ArrayRef>

Compare a values between lower </<= value </<= upper

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.

Implementors§