[ https://issues.apache.org/jira/browse/SPARK-34191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17270101#comment-17270101 ]
Piotr Grzegorski commented on SPARK-34191: ------------------------------------------ Leaving a comment as requested > 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 > Fix For: 3.1.2 > > > 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