You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maciej Szymkiewicz (Jira)" <ji...@apache.org> on 2021/01/21 14:09:00 UTC

[jira] [Created] (SPARK-34191) udf type hint should allow dectorator with named returnType

Maciej Szymkiewicz created SPARK-34191:
------------------------------------------

             Summary: udf type hint should allow dectorator with named returnType
                 Key: SPARK-34191
                 URL: https://issues.apache.org/jira/browse/SPARK-34191
             Project: Spark
          Issue Type: Improvement
          Components: PySpark
    Affects Versions: 3.1.0, 3.2.0, 3.1.1
            Reporter: Maciej Szymkiewicz


At the moment annotations allow following decorated patterns:
 
{code:python}
@udf
def f(x): ...

@udf("string")  # Or DataType instance
def f(x): ...

@udf(f="string")  # Awkward but technically valid
def f(x): ...
{code}

We should also support 

{code:python}
@udf(returnType="string")
def f(x): ...
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org