Skip to main content

Crate vortex_functions

Crate vortex_functions 

Source
Expand description

Scalar functions built on the vortex-array scalar function framework that the core array crate does not itself depend on.

The scalar functions that canonical arrays, validity, the optimizer and expression analysis rely on (cast, fill_null, mask, binary operators, get_item, pack, literal, …) live in vortex_array::scalar_fn::builtin. This crate holds struct projection and merging (select, merge), null checks (is_null), conditionals (case_when, zip), list functions (list_length, list_sum, list_transform), byte_length, ext_storage and replace_time_zone, string functions (lower, strpos), string and range predicates (like, between, list_contains, is_nan) and the scan-time dynamic and dynamic_expression functions, whose value changes during a scan, along with their expression constructors in expr and their statistics-based pruning rewrites.

Call initialize to register them with a session.

Modules§

between
builtins
Builder methods for this crate’s scalar functions, complementing ExprBuiltins and ArrayBuiltins.
byte_length
case_when
SQL-style CASE WHEN: evaluates (condition, value) pairs in order and returns the value from the first matching condition (first-match-wins). NULL conditions are treated as false. If no ELSE clause is provided, unmatched rows produce NULL; otherwise they get the ELSE value.
dynamic
dynamic_expression
Predicates with fixed inputs and a body that changes during execution.
expr
Expression constructors for this crate’s scalar functions.
ext_storage
is_nan
is_null
like
list_contains
list_length
list_sum
list_transform
lower
lower_bound
merge
pruning
Statistics-based pruning rewrites for this crate’s scalar functions.
replace_time_zone
Reinterpret timestamp wall times in a different timezone.
select
strpos
variant_get
zip

Functions§

initialize
Register this crate’s scalar functions with the given session.
is_negative_cost
A scalar function has a negative cost if applying it to an array and canonicalizing is cheaper than canonicalizing an array and applying it.