You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Armbrust (JIRA)" <ji...@apache.org> on 2014/10/09 03:07:33 UTC
[jira] [Resolved] (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:all-tabpanel ]
Michael Armbrust resolved SPARK-3707.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.2.0
Issue resolved by pull request 2559
[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
> Fix For: 1.2.0
>
>
> 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