FunctionRegistry

FunctionRegistry is a base registry (aka catalog) of native and user-defined functions.

Note
The one and only FunctionRegistry available in Spark SQL is SimpleFunctionRegistry.

You can access a session-specific FunctionRegistry through SessionState.

val spark: SparkSession = ...
spark.sessionState.functionRegistry
Note
You can register a new user-defined function using UDFRegistration.
Table 1. FunctionRegistry’s Attributes (in alphabetical order)
Name Description

builtin

SimpleFunctionRegistry with the built-in functions registered.

expressions

Collection of expressions that represent built-in/native functions.

lookupFunction Method

Caution
FIXME

registerFunction Methods

registerFunction(name: String, builder: FunctionBuilder): Unit  (1)
registerFunction(name: String, info: ExpressionInfo, builder: FunctionBuilder): Unit
  1. Relays calls to the other registerFunction

Note
registerFunction is used when…​FIXME

SimpleFunctionRegistry

SimpleFunctionRegistry is the default FunctionRegistry that is backed by a hash map (with optional case sensitivity).

results matching ""

    No results matching ""