Github user holdenk commented on the issue: https://github.com/apache/spark/pull/16534 I'm not sure about `wraps` but with `update_wrapper`, I tested it in a Jupyter kernel and it seems to give all of the docstring and signature information without adding another function dispatch inside of PySpark UDFs. In IPython ` def foo(x): """Identity""" return x class F(): def __init__(self, f): self.f = f def __call__(self, x): return f(x) a = update_wrapper(F(foo), foo)` results in a help string (from `?a`) of: > Call signature: a(x) Type: instance Base Class: __main__.F String form: <__main__.F instance at 0x7febb43d6ef0> Docstring: Identity Which seems like everything the current implementation does without adding the indirection. Is this not the behavior you are seeing?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org