Skip to main content

Module scalar_fn

Module scalar_fn 

Source
Expand description

Scalar function vtable machinery.

This module contains the ScalarFnVTable trait and all built-in scalar function implementations. Expressions (crate::expr::Expression) reference scalar functions at each node.

Strict functions with row-at-a-time kernels can implement unstable::row::RowFn. It handles decoding, constants, null propagation, output construction, and validity. This API requires the unstable_row_fns feature and has no compatibility guarantees. Implement ScalarFnVTable directly for columnar kernels and functions that alias an input or can produce null from valid inputs.

Modules§

fns
internal
session
unstable
Experimental scalar-function APIs without compatibility guarantees.

Structs§

ArrayReduceNode
A ReduceNode over an array tree.
EmptyOptions
ExpressionReduceNode
A ReduceNode over an expression tree, typed within a scope.
ForeignScalarFnOptions
Options payload for a foreign scalar function.
ForeignScalarFnVTable
Scalar function placeholder used when deserializing an unknown scalar function ID.
ScalarFnOptions
An opaque handle to expression options.
ScalarFnRef
A type-erased scalar function, pairing a vtable with bound options behind a trait object.
ScalarFnSignature
Information about the signature of an expression.
TypedScalarFnInstance
A typed scalar function instance, parameterized by a concrete ScalarFnVTable.
VecExecutionArgs
A concrete ExecutionArgs backed by a Vec<ArrayRef>.

Enums§

Arity
The arity (number of arguments) of a function.

Traits§

ExecutionArgs
Arguments for expression execution.
ReduceNode
A node used for implementing abstract reduction rules over a tree of scalar functions.
ScalarFnPlugin
Registry trait for ID-based deserialization of scalar functions.
ScalarFnVTable
This trait defines the interface for scalar function vtables, including methods for serialization, deserialization, validation, child naming, return type computation, and evaluation.
ScalarFnVTableExt
Factory functions for vtables.
SimplifyCtx
Context for simplification.

Functions§

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.

Type Aliases§

ChildName
A reference to the name of a child expression.
ScalarFnId
A unique identifier for a scalar function.
ScalarFnPluginRef
Reference-counted pointer to a scalar function plugin.