You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Li Sheng (JIRA)" <ji...@apache.org> on 2015/06/01 11:31:17 UTC
[jira] [Created] (SPARK-8010) Implict promote Numeric type to
String type in HiveTypeCoercion
Li Sheng created SPARK-8010:
-------------------------------
Summary: 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.3.1
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