Github user rdblue commented on the issue: https://github.com/apache/spark/pull/16533 @zero323, I think that the decorator and existing UDF factory method should be the same, but that we can't break existing code. Can you explain why this necessarily breaks code that relies on returnType as a positional arg? What about something like this: ```python @functools.wraps(_udf) def udf(f=None, returnType=StringType()): """A decorator version of pyspark.sql.functions.udf """ if f is None: return functools.partial(_udf, returnType=returnType) else: return _udf(f=f, returnType=returnType) ```
--- 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