SimpleFunctionRegistryBase¶
SimpleFunctionRegistryBase[T]
is an extension of the FunctionRegistryBase abstraction for function registries (of type T
).
Implementations¶
- SimpleFunctionRegistry (for scalar functions using Expressions)
- SimpleTableFunctionRegistry (for table-valued functions using LogicalPlans)
functionBuilders¶
functionBuilders: HashMap[FunctionIdentifier, (ExpressionInfo, FunctionBuilder)]
SimpleFunctionRegistryBase
defines functionBuilders
registry of named user-defined functions.
A new user-defined function is registered in internalRegisterFunction.
functionBuilders
is used when:
lookupFunction¶
lookupFunction(
name: FunctionIdentifier): Option[ExpressionInfo]
lookupFunction
is part of the FunctionRegistryBase abstraction.
lookupFunction
finds the given name
in the functionBuilders registry.
Registering Named User-Defined Function¶
registerFunction(
name: FunctionIdentifier,
info: ExpressionInfo,
builder: FunctionBuilder): Unit
registerFunction
is part of the FunctionRegistryBase abstraction.
registerFunction
internalRegisterFunction with a normalized (lower-case) name.
internalRegisterFunction¶
internalRegisterFunction(
name: FunctionIdentifier,
info: ExpressionInfo,
builder: FunctionBuilder): Unit
internalRegisterFunction
adds a new function to the functionBuilders registry.
internalRegisterFunction
is used when;
SimpleFunctionRegistryBase
is requested to registerFunctionFunctionRegistry
utility is used to create a SimpleFunctionRegistry with built-in functionsTableFunctionRegistry
utility is used to create a SimpleTableFunctionRegistry with built-in functions