UserDefinedPythonFunction¶
UserDefinedPythonFunction represents a user-defined Python function.
Creating Instance¶
UserDefinedPythonFunction takes the following to be created:
- Name
-
PythonFunction - DataType
- Eval Type
-
udfDeterministicflag
UserDefinedPythonFunction is created when:
SparkConnectPlanneris requested tohandleRegisterPythonUDF(to register a user-defined Python function)
Creating Column (to Execute PythonUDF)¶
apply(
exprs: Column*): Column
apply creates a Column with the PythonUDF for the given Column expressions.
Creating PythonUDF¶
builder(
e: Seq[Expression]): Expression
builder creates a PythonUDF expression (for the given Expressions).
builder is used when:
UDFRegistrationis requested to register a named user-defined Python functionUserDefinedPythonFunctionis requested to create a Column