spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdblue <>
Subject [GitHub] spark issue #16533: [SPARK-19160][PYTHON][SQL][WIP] Add udf decorator
Date Thu, 19 Jan 2017 19:31:12 GMT
Github user rdblue commented on the issue:
    @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:
    def udf(f=None, returnType=StringType()):
        """A decorator version of pyspark.sql.functions.udf
        if f is None:
            return functools.partial(_udf, returnType=returnType)
            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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message