pub struct ScalarFunctionImpl {
pub args: Vec<ArgumentsItem>,
pub options: Options,
pub variadic: Option<VariadicBehavior>,
pub session_dependent: bool,
pub deterministic: bool,
pub nullability: NullabilityHandling,
pub return_type: ConcreteType,
pub implementation: HashMap<String, String>,
}parse only.Expand description
A single function implementation (overload) with signature and resolved types
Fields§
§args: Vec<ArgumentsItem>Function arguments with types and optional names/descriptions
options: OptionsConfigurable function options (e.g., overflow behavior, rounding modes)
variadic: Option<VariadicBehavior>Variadic argument behavior.
None indicates the function is not variadic.
session_dependent: boolWhether the function output depends on session state (e.g., timezone, locale).
Defaults to false per the Substrait spec.
deterministic: boolWhether the function is deterministic (same inputs always produce same output).
Defaults to true per the Substrait spec.
nullability: NullabilityHandlingHow the function handles null inputs and produces nullable outputs.
Defaults to NullabilityHandling::Mirror per the Substrait spec.
return_type: ConcreteTypeReturn type resolved to a concrete type
The raw YAML type string is parsed and validated. Only concrete types (without type variables) are supported; functions with type variables are skipped in this basic implementation.
implementation: HashMap<String, String>Language-specific implementation code (e.g., SQL, C++, Python)
Maps language identifiers to implementation source code snippets.