Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/pyspark/sql/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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__

includes, sc.pythonExec, broadcast_vars,
sc._javaAccumulator, jdt)
return judf
Expand Down