[ 
https://issues.apache.org/jira/browse/SPARK-34191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17269364#comment-17269364
 ] 

Apache Spark commented on SPARK-34191:
--------------------------------------

User 'pgrz' has created a pull request for this issue:
https://github.com/apache/spark/pull/31282

> 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
>            Priority: Major
>
> 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to