[ 
https://issues.apache.org/jira/browse/SPARK-19427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

holdenk resolved SPARK-19427.
-----------------------------
       Resolution: Fixed
         Assignee: Maciej Szymkiewicz
    Fix Version/s: 2.2.0

Thanks for doing all of these improvements to the UDF Python APIs :)

> UserDefinedFunction should support data types strings
> -----------------------------------------------------
>
>                 Key: SPARK-19427
>                 URL: https://issues.apache.org/jira/browse/SPARK-19427
>             Project: Spark
>          Issue Type: Sub-task
>          Components: PySpark, SQL
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Maciej Szymkiewicz
>            Assignee: Maciej Szymkiewicz
>             Fix For: 2.2.0
>
>
> PySpark SQL supports casting using data type strings. 
> {code}
> from pyspark.sql.functions import col
> col("foo").cast("integer")
> {code}
> It should be possible to do the same with {{udf}} / {{UserDefinedFunction}}:
> {code}
> from pyspark.sql import udf
> udf(lambda x: x + 1, "integer")
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to