You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2014/09/27 17:00:35 UTC

[jira] [Commented] (SPARK-3707) Type Coercion for DIV doesn't work for non-numeric argument

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

Apache Spark commented on SPARK-3707:
-------------------------------------

User 'chenghao-intel' has created a pull request for this issue:
https://github.com/apache/spark/pull/2559

> Type Coercion for DIV doesn't work for non-numeric argument
> -----------------------------------------------------------
>
>                 Key: SPARK-3707
>                 URL: https://issues.apache.org/jira/browse/SPARK-3707
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Cheng Hao
>            Priority: Minor
>
> When do query like "select key/2 from src", it throws exception like
> {panel}
> 14/09/27 22:14:36 ERROR SparkSQLDriver: Failed in [select key/2 from src]
> org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to datatype. Can not resolve due to differing types DoubleType, IntegerType on unresolved object, tree: (CAST(key#3, DoubleType) / 2)
> 	at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:62)
> 	at org.apache.spark.sql.catalyst.analysis.HiveTypeCoercion$Division$$anonfun$apply$9.applyOrElse(HiveTypeCoercion.scala:351)
> 	at org.apache.spark.sql.catalyst.analysis.HiveTypeCoercion$Division$$anonfun$apply$9.applyOrElse(HiveTypeCoercion.scala:346)
> 	at org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:144)
> 	at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$4.apply(TreeNode.scala:162)
> {panel}



--
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