Module func

Source
Expand description

TBD: Currently, sql::func handles matching arguments to their respective built-in functions (for most built-in functions, at least).

Macrosยง

builtins ๐Ÿ”’
Constructs builtin function map.
catalog_name_only ๐Ÿ”’
Functions using this macro should be transformed/planned away before reaching function selection code, but still need to be present in the catalog during planning.
impl_def ๐Ÿ”’
params ๐Ÿ”’
Provides shorthand for converting Vec<ScalarType> into Vec<ParamType>.
privilege_fn ๐Ÿ”’
Generates an (OID, OID, TEXT) SQL implementation for has_X_privilege style functions.

Structsยง

Candidate
Tracks candidate implementations.
FuncImpl
Describes a single functionโ€™s implementation.
FuncImplCatalogDetails
Describes how each implementation should be represented in the catalog.
Operation
Builds an expression that evaluates a scalar function on the provided input expressions.
PolymorphicSolution ๐Ÿ”’
Represents a solution to a set of polymorphic constraints, expressed as the params of a function and the user-supplied args.
ReturnType
TableFuncPlan

Enumsยง

Func
FuncSpec
A specifier for a function or an operator.
ParamList
Describes possible types of function parameters.
ParamType
Describes parameter types.
PolymorphicCompatClass ๐Ÿ”’

Staticsยง

INFORMATION_SCHEMA_BUILTINS
MZ_CATALOG_BUILTINS
MZ_INTERNAL_BUILTINS
MZ_UNSAFE_BUILTINS
OP_IMPLS
Correlates an operator with all of its implementations.
PG_CATALOG_BUILTINS
Correlates a built-in function name to its implementations.

Functionsยง

array_to_string ๐Ÿ”’
coerce_args_to_types ๐Ÿ”’
current_settings ๐Ÿ”’
digest ๐Ÿ”’
experimental_sql_impl_table_func ๐Ÿ”’
find_match ๐Ÿ”’
Finds an exact match based on the arguments, or, if no exact match, finds the best match available. Patterned after PostgreSQLโ€™s type conversion matching algorithm.
resolve_op
Resolves the operator to a set of function implementations.
select_impl
Selects the best implementation given the provided args using a process similar to PostgreSQLโ€™s parser, and returns the ScalarExpr to invoke that function.
sql_impl
Backing implementation for sql_impl_func and sql_impl_cast. See those functions for details.
sql_impl_func ๐Ÿ”’
sql_impl_table_func ๐Ÿ”’
sql_impl_table_func_inner ๐Ÿ”’