Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/20217#discussion_r160862123 --- Diff: python/pyspark/sql/context.py --- @@ -203,18 +203,46 @@ def registerFunction(self, name, f, returnType=StringType()): >>> _ = sqlContext.udf.register("stringLengthInt", lambda x: len(x), IntegerType()) >>> sqlContext.sql("SELECT stringLengthInt('test')").collect() [Row(stringLengthInt(test)=4)] + """ + return self.sparkSession.catalog.registerFunction(name, f, returnType) + + @ignore_unicode_prefix + @since(2.3) + def registerUDF(self, name, f): --- End diff -- I think that's ideally right. But let's keep it consistent with the convention used here. Let's discuss and try it separately and do it in batch.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org