Skip to content


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)

  exprs: Column*): Column

apply is part of the UserDefinedFunction abstraction.

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

Creating ScalaUDF

  exprs: Seq[Expression]): ScalaUDF

createScalaUDF creates a ScalaUDF expression.

createScalaUDF is used when: