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 2015/06/17 22:39:01 UTC
[jira] [Resolved] (SPARK-8010) Implict promote Numeric type to
String type in HiveTypeCoercion
[ https://issues.apache.org/jira/browse/SPARK-8010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Armbrust resolved SPARK-8010.
-------------------------------------
Resolution: Fixed
Fix Version/s: (was: 1.3.1)
1.5.0
Issue resolved by pull request 6551
[https://github.com/apache/spark/pull/6551]
> Implict promote Numeric type to String type in HiveTypeCoercion
> ---------------------------------------------------------------
>
> Key: SPARK-8010
> URL: https://issues.apache.org/jira/browse/SPARK-8010
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.3.1
> Reporter: Li Sheng
> Fix For: 1.5.0
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> 1. Given a query
> `select coalesce(null, 1, '1') from dual` will cause exception:
>
> java.lang.RuntimeException: Could not determine return type of Coalesce for IntegerType,StringType
> 2. Given a query:
> `select case when true then 1 else '1' end from dual` will cause exception:
> java.lang.RuntimeException: Types in CASE WHEN must be the same or coercible to a common type: StringType != IntegerType
> I checked the code, the main cause is the HiveTypeCoercion doesn't do implicit convert when there is a IntegerType and StringType.
> Numeric types can be promoted to string type in case throw exceptions.
> Since Hive will always do this. It need to be fixed.
--
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