Github user holdenk commented on a diff in the pull request:
https://github.com/apache/spark/pull/9766#discussion_r81877809
--- Diff: python/pyspark/sql/context.py ---
@@ -202,6 +202,10 @@ def registerFunction(self, name, f,
returnType=StringType()):
"""
self.sparkSession.catalog.registerFunction(name, f, returnType)
+ def registerJavaFunction(self, name, javaClassName, returnType):
--- End diff --
It would be good to have tests that call this from the Python side, also it
probably needs a docstring and since annotation as well (see registerFunction
since you take similar params).
It might also make sense to have the same default return type of StringType
as the current registerFunction but that is more a matter of taste.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]