Expand description

Declaration of built-in (scalar) functions. This module contains built-in functions’ enumeration and metadata.

Generally, a function has:

  • a signature

  • a return type, that is a function of the incoming argument’s types

  • the computation, that must accept each valid signature

  • Signature: see Signature

  • Return type: a function (arg_types) -> return_type. E.g. for sqrt, (f32) -> f32, (f64) -> f64.

This module also supports coercion to improve user experience: if an argument i32 is passed to a function that supports f64, the argument is automatically is coerced to f64.

Enums§

Functions§

  • Create a physical (function) expression. This function errors when args’ can’t be coerced to a valid argument type of the function.
  • Create a physical scalar function.
  • Decorates a function to handle ScalarValues by converting them to arrays before calling the function and vice-versa after evaluation. Note that this function makes a scalar function with no arguments or all scalar inputs return a scalar. That’s said its output will be same for all input rows in a batch.
  • Determines a ScalarFunctionExpr’s monotonicity for the given arguments and the function’s behavior depending on its arguments.

Type Aliases§

  • Monotonicity of the ScalarFunctionExpr with respect to its arguments. Each element of this vector corresponds to an argument and indicates whether the function’s behavior is monotonic, or non-monotonic/unknown for that argument, namely: