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

Apache Spark commented on SPARK-8010:
-------------------------------------

User 'OopsOutOfMemory' has created a pull request for this issue:
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.3.1
>
>   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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to