pyspark.sql.UDFRegistration#
- class pyspark.sql.UDFRegistration(sparkSession)[source]#
Wrapper for user-defined function registration. This instance can be accessed by
spark.udf
orsqlContext.udf
.New in version 1.3.1.
Methods
register
(name, f[, returnType])Register a Python function (including lambda function) or a user-defined function as a SQL function.
registerJavaFunction
(name, javaClassName[, ...])Register a Java user-defined function as a SQL function.
registerJavaUDAF
(name, javaClassName)Register a Java user-defined aggregate function as a SQL function.