pub trait ExprBuiltins: Sized {
// Required methods
fn cast(&self, dtype: DType) -> VortexResult<Expression>;
fn fill_null(&self, fill_value: Expression) -> VortexResult<Expression>;
fn get_item(
&self,
field_name: impl Into<FieldName>,
) -> VortexResult<Expression>;
fn is_null(&self) -> VortexResult<Expression>;
fn mask(&self, mask: Expression) -> VortexResult<Expression>;
fn not(&self) -> VortexResult<Expression>;
fn list_contains(&self, value: Expression) -> VortexResult<Expression>;
fn zip(
&self,
if_false: Expression,
mask: Expression,
) -> VortexResult<Expression>;
fn binary(&self, rhs: Expression, op: Operator) -> VortexResult<Expression>;
}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<Expression>
fn cast(&self, dtype: DType) -> VortexResult<Expression>
Cast to the given data type.
Sourcefn fill_null(&self, fill_value: Expression) -> VortexResult<Expression>
fn fill_null(&self, fill_value: Expression) -> VortexResult<Expression>
Replace null values with the given fill value.
Sourcefn get_item(&self, field_name: impl Into<FieldName>) -> VortexResult<Expression>
fn get_item(&self, field_name: impl Into<FieldName>) -> VortexResult<Expression>
Get item by field name (for struct types).
Sourcefn is_null(&self) -> VortexResult<Expression>
fn is_null(&self) -> VortexResult<Expression>
Is null check.
Sourcefn mask(&self, mask: Expression) -> VortexResult<Expression>
fn mask(&self, mask: Expression) -> VortexResult<Expression>
Mask the expression using the given boolean mask. The resulting expression’s validity is the intersection of the original expression’s validity.
Sourcefn not(&self) -> VortexResult<Expression>
fn not(&self) -> VortexResult<Expression>
Boolean negation.
Sourcefn list_contains(&self, value: Expression) -> VortexResult<Expression>
fn list_contains(&self, value: Expression) -> VortexResult<Expression>
Check if a list contains a value.
Sourcefn zip(
&self,
if_false: Expression,
mask: Expression,
) -> VortexResult<Expression>
fn zip( &self, if_false: Expression, mask: Expression, ) -> VortexResult<Expression>
Conditional selection: result[i] = if mask[i] then self[i] else if_false[i].
Sourcefn binary(&self, rhs: Expression, op: Operator) -> VortexResult<Expression>
fn binary(&self, rhs: Expression, op: Operator) -> VortexResult<Expression>
Apply a binary operator to this expression and another.
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.