Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/5206#discussion_r27236553
--- Diff: python/pyspark/sql/functions.py ---
@@ -123,7 +123,7 @@ def _create_judf(self):
pickled_command, broadcast_vars, env, includes =
_prepare_for_python_RDD(sc, command, self)
ssql_ctx = sc._jvm.SQLContext(sc._jsc.sc())
jdt = ssql_ctx.parseDataType(self.returnType.json())
- judf = sc._jvm.UserDefinedPythonFunction(f.__name__,
bytearray(pickled_command), env,
+ judf = sc._jvm.UserDefinedPythonFunction(f.__repr__(),
bytearray(pickled_command), env,
--- End diff --
Could we try to get the name from it? Having a friendly name will help
debugging.
name = f.__name__ if hasattr(f, â__name__") else f.__class__.__name__
---
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]