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§
Sourcefn cast(&self, dtype: DType) -> VortexResult<ArrayRef>
fn cast(&self, dtype: DType) -> VortexResult<ArrayRef>
Cast to the given data type.
Sourcefn fill_null(&self, fill_value: impl Into<Scalar>) -> VortexResult<ArrayRef>
fn fill_null(&self, fill_value: impl Into<Scalar>) -> VortexResult<ArrayRef>
Replace null values with the given fill value.
Sourcefn get_item(&self, field_name: impl Into<FieldName>) -> VortexResult<ArrayRef>
fn get_item(&self, field_name: impl Into<FieldName>) -> VortexResult<ArrayRef>
Get item by field name (for struct types).
Sourcefn is_not_null(&self) -> VortexResult<ArrayRef>
fn is_not_null(&self) -> VortexResult<ArrayRef>
Is not null check.
Sourcefn mask(self, mask: ArrayRef) -> VortexResult<ArrayRef>
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.
Sourcefn not(&self) -> VortexResult<ArrayRef>
fn not(&self) -> VortexResult<ArrayRef>
Boolean negation.
Sourcefn interleave(
&self,
values: impl IntoIterator<Item = ArrayRef>,
row_indices: ArrayRef,
) -> VortexResult<ArrayRef>
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.
Sourcefn compare(&self, rhs: ArrayRef, op: CompareOperator) -> VortexResult<ArrayRef>
fn compare(&self, rhs: ArrayRef, op: CompareOperator) -> VortexResult<ArrayRef>
Compare this array with another.
Sourcefn boolean(&self, rhs: ArrayRef, op: BooleanOperator) -> VortexResult<ArrayRef>
fn boolean(&self, rhs: ArrayRef, op: BooleanOperator) -> VortexResult<ArrayRef>
Apply a Kleene boolean operator to this array and another.
Sourcefn numeric(&self, rhs: ArrayRef, op: NumericOperator) -> VortexResult<ArrayRef>
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".