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
ExprBuiltinsandArrayBuiltins. - 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. - change_
time_ unit - Convert a temporal value to a coarser unit with an explicit rounding mode.
- convert_
time_ zone - Change the time zone of a timestamp and keep its instant.
- 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
- timestamp_
to_ date - Extract the local calendar date of a timestamp.
- timestamp_
to_ time - Extract the local time of day of a timestamp.
- 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.