Expand description
Vortex’s expression language.
All expressions are serializable, and own their own wire format.
The implementation takes inspiration from Postgres and Apache Datafusion.
Re-exports§
pub use pruning::StatsCatalog;pub use analysis::*;
Modules§
- aliases
- analysis
- arbitrary
- display
- forms
- proto
- pruning
- session
- stats
- test_
harness - transform
- A collection of transformations that can be applied to a
crate::expr::Expression. - traversal
- Datafusion inspired tree traversal logic.
Structs§
- Between
- An optimized scalar expression to compute whether values fall between two bounds.
- Between
Execute Adaptor - Adapts a
BetweenKernelimpl into anExecuteParentKernelforScalarFnArray(Between, ...). - Between
Options - Between
Reduce Adaptor - Adapts a
BetweenReduceimpl into anArrayParentReduceRuleforScalarFnArray(Between, ...). - Binary
- Cast
- A cast expression that converts values to a target data type.
- Cast
Execute Adaptor - Adapts a
CastKernelimpl into anExecuteParentKernelforScalarFnArray(Cast, ...). - Cast
Reduce Adaptor - Adapts a
CastReduceimpl into anArrayParentReduceRuleforScalarFnArray(Cast, ...). - Compare
Execute Adaptor - Adaptor that bridges
CompareKernelimplementations toExecuteParentKernel. - Dynamic
Comparison - A dynamic comparison expression can be used to capture a comparison to a value that can change during the execution of a query, such as when a compute engine pushes down an ORDER BY + LIMIT operation and is able to progressively tighten the bounds of the filter.
- Dynamic
Comparison Expr - Dynamic
Expr Updates - A utility for checking whether any dynamic expressions have been updated.
- Empty
Options - Exact
Expr - An expression wrapper that performs pointer equality on child expressions.
- Execution
Args - Arguments for expression execution.
- ExprV
Table - A Vortex expression vtable, used to deserialize or instantiate expressions dynamically.
- Expression
- A node in a Vortex expression tree.
- Fill
Null - An expression that replaces null values in the input with a fill value.
- Fill
Null Execute Adaptor - Adaptor that wraps a
FillNullKernelimpl as anExecuteParentKernel. - Fill
Null Reduce Adaptor - Adaptor that wraps a
FillNullReduceimpl as anArrayParentReduceRule. - GetItem
- IsNull
- Expression that checks for null values.
- Like
- Expression that performs SQL LIKE pattern matching.
- Like
Execute Adaptor - Adaptor that wraps a
LikeKernelimpl as anExecuteParentKernel. - Like
Options - Options for SQL LIKE function
- Like
Reduce Adaptor - Adaptor that wraps a
LikeReduceimpl as anArrayParentReduceRule. - List
Contains - Literal
- Expression that represents a literal scalar value.
- Mask
- An expression that masks an input based on a boolean mask.
- Mask
Execute Adaptor - Adaptor that wraps a
MaskKernelimpl as anExecuteParentKernel. - Mask
Reduce Adaptor - Adaptor that wraps a
MaskReduceimpl as anArrayParentReduceRule. - Merge
- Merge zero or more expressions that ALL return structs.
- Not
- Expression that logically inverts boolean values.
- NotExecute
Adaptor - Adaptor that wraps a
NotKernelimpl as anExecuteParentKernel. - NotReduce
Adaptor - Adaptor that wraps a
NotReduceimpl as anArrayParentReduceRule. - NotSupported
- A placeholder vtable implementation for unsupported optional functionality of an expression.
- Pack
- Pack zero or more expressions into a structure with named fields.
- Pack
Options - Root
- An expression that returns the full scope of the expression evaluation.
- Scalar
Fn - An instance of an expression bound to some invocation options.
- Select
- VTable
Adapter - Zip
- An expression that conditionally selects between two arrays based on a boolean mask.
- ZipExecute
Adaptor - Adaptor that wraps a
ZipKernelimpl as anExecuteParentKernel. - ZipReduce
Adaptor - Adaptor that wraps a
ZipReduceimpl as anArrayParentReduceRule.
Enums§
- Arity
- The arity (number of arguments) of a function.
- Duplicate
Handling - What to do when merged structs share a field name.
- Field
Selection - Operator
- Equalities, inequalities, and boolean operations over possibly null values.
- Strict
Comparison - Strictness of the comparison.
Traits§
- Between
Kernel - Execute kernel for between: perform the actual between check, potentially reading buffers.
- Between
Reduce - Reduce rule for between: restructure the array without reading buffers.
- Cast
Kernel - Execute kernel for cast: perform the actual value conversion, potentially reading buffers.
- Cast
Reduce - Reduce rule for cast: restructure the array without reading buffers.
- Compare
Kernel - Trait for encoding-specific comparison kernels that operate in encoded space.
- DynExprV
Table - An object-safe trait for dynamic dispatch of Vortex expression vtables.
- Fill
Null Kernel - Fill nulls in an array with a scalar value, potentially reading buffers.
- Fill
Null Reduce - Fill nulls in an array with a scalar value without reading buffers.
- Like
Kernel - Like pattern matching on an array, potentially reading buffers.
- Like
Reduce - Like pattern matching on an array without reading buffers.
- Mask
Kernel - Mask an array, potentially reading buffers.
- Mask
Reduce - Mask an array without reading buffers.
- NotKernel
- Invert a boolean array, potentially reading buffers.
- NotReduce
- Invert a boolean array without reading buffers.
- Reduce
Ctx - Arguments for reduction rules.
- Reduce
Node - A node used for implementing abstract reduction rules.
- Simplify
Ctx - Context for simplification.
- VTable
- This trait defines the interface for expression vtables, including methods for serialization, deserialization, validation, child naming, return type computation, and evaluation.
- VTable
Ext - Factory functions for static vtables.
- Vortex
Expr Ext - ZipKernel
- Zip two arrays using a mask, potentially reading buffers.
- ZipReduce
- Zip two arrays using a mask without reading buffers.
Functions§
- and
- Create a new
Binaryusing theAndoperator. - and_
collect - Collects a list of
anded values into a single expression using a balanced tree. - between
- Creates an expression that checks if values are between two bounds.
- cast
- Creates an expression that casts values to a target data type.
- checked_
add - Create a new
Binaryusing theAddoperator. - col
- Creates an expression that accesses a field from the root array.
- dynamic
- eq
- Create a new
Binaryusing theEqoperator. - fill_
null - Creates an expression that replaces null values with a fill value.
- get_
item - Creates an expression that extracts a named field from a struct expression.
- gt
- Create a new
Binaryusing theGtoperator. - gt_eq
- Create a new
Binaryusing theGteoperator. - ilike
- is_null
- Creates an expression that checks for null values.
- is_root
- Return whether the expression is a root expression.
- like
- list_
contains - Creates an expression that checks if a value is contained in a list.
- lit
- Create a new
Literalexpression from a type that coerces toScalar. - lt
- Create a new
Binaryusing theLtoperator. - lt_eq
- Create a new
Binaryusing theLteoperator. - mask
- Creates a mask expression that applies the given boolean mask to the input array.
- merge
- Creates an expression that merges struct expressions into a single struct.
- merge_
opts - not
- Creates an expression that logically inverts boolean values.
- not_eq
- Create a new
Binaryusing theNotEqoperator. - not_
ilike - not_
like - or
- Create a new
Binaryusing theOroperator. - or_
collect - Collects a list of
ored values into a single expression using a balanced tree. - pack
- Creates an expression that packs values into a struct with named fields.
- root
- Creates an expression that references the root scope.
- select
- Creates an expression that selects (includes) specific fields from an array.
- select_
exclude - Creates an expression that excludes specific fields from an array.
- split_
conjunction - Splits top level and operations into separate expressions.
- zip_
expr - Creates a zip expression that conditionally selects between two arrays.
Type Aliases§
- Child
Name - A reference to the name of a child expression.
- ExprId
- Reduce
Node Ref