Skip to content

FunctionRegistryBase

FunctionRegistryBase[T] is an abstraction of function registries for registering functions (that produce a result of type T).

Contract (Subset)

lookupFunction

lookupFunction(
  name: FunctionIdentifier): Option[ExpressionInfo]

Looks up the ExpressionInfo metadata of a user-defined function by the given name

See SimpleFunctionRegistryBase

Used when:

Registering Named User-Defined Function

registerFunction(
  name: FunctionIdentifier,
  info: ExpressionInfo,
  builder: Seq[Expression] => T): Unit

Registers a user-defined function (written in Python, Scala or Java) under the given name

See SimpleFunctionRegistryBase

Used when:

Implementations

createOrReplaceTempFunction

createOrReplaceTempFunction(
  name: String,
  builder: FunctionBuilder,
  source: String): Unit

createOrReplaceTempFunction registers a named function (with a FunctionIdentifier for the given name).

source Argument

source Call Site
python_udf UDFRegistration.registerPython
scala_udf UDFRegistration.register
java_udf UDFRegistration.register

source is used to create an ExpressionInfo for registering a named function.


createOrReplaceTempFunction is used when:

  • UDFRegistration is requested to register a user-defined function written in Python or Scala