Skip to content

SparkUserDefinedFunction

SparkUserDefinedFunction is a UserDefinedFunction that uses ScalaUDF for execution.

SparkUserDefinedFunction is created using udf standard function (among the other less interesting means).

Creating Instance

SparkUserDefinedFunction takes the following to be created:

SparkUserDefinedFunction is created when:

Creating Column (for Function Execution)

apply(
  exprs: Column*): Column

apply is part of the UserDefinedFunction abstraction.


apply creates a Column with a ScalaUDF (with the given exprs).

Creating ScalaUDF

createScalaUDF(
  exprs: Seq[Expression]): ScalaUDF

createScalaUDF creates a ScalaUDF expression.


createScalaUDF is used when: