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