spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-8572) Type coercion for ScalaUDFs
Date Fri, 03 Jul 2015 01:42:04 GMT

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

Apache Spark commented on SPARK-8572:
-------------------------------------

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

> Type coercion for ScalaUDFs
> ---------------------------
>
>                 Key: SPARK-8572
>                 URL: https://issues.apache.org/jira/browse/SPARK-8572
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Yin Huai
>            Priority: Critical
>
> Seems we do not do type coercion for ScalaUDFs. The following code will hit a runtime
exception.
> {code}
> import org.apache.spark.sql.functions._
> val myUDF = udf((x: Int) => x + 1)
> val df = sqlContext.range(1, 10).toDF("i").select(myUDF($"i"))
> df.explain(true)
> df.show
> {code}
> It is also good to check if we do type coercion for PythonUDFs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message