pyspark.sql.Catalog.registerFunction

Catalog.registerFunction(name: str, f: Callable[[…], Any], returnType: Optional[DataType] = None) → UserDefinedFunctionLike

An alias for spark.udf.register(). See pyspark.sql.UDFRegistration.register().

Use spark.udf.register() instead.