UDFRegistration is an interface to the session-scoped FunctionRegistry to register user-defined functions (UDFs) and user-defined aggregate functions (UDAFs).

UDFRegistration is available using SparkSession.

import org.apache.spark.sql.SparkSession
val spark: SparkSession = ...

UDFRegistration is created exclusively for SessionState.

Creating UDFRegistration Instance

UDFRegistration takes the following when created:

Registering UserDefinedAggregateFunction (with FunctionRegistry) — register Method

  name: String,
  udaf: UserDefinedAggregateFunction): UserDefinedAggregateFunction

register creates a ScalaUDAF internally to register a UDAF.

register gives the input udaf aggregate function back after the function has been registered with FunctionRegistry.

results matching ""

    No results matching ""