You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Liang Ke (JIRA)" <ji...@apache.org> on 2016/07/26 11:08:20 UTC

[jira] [Updated] (SPARK-16735) Fail to create a map contains decimal type with literals having different inferred precessions and scales

     [ https://issues.apache.org/jira/browse/SPARK-16735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Liang Ke updated SPARK-16735:
-----------------------------
    Attachment: SPARK-16735.patch

hi, if some one can help me to push my patch to github? thx alot:)

> Fail to create a map contains decimal type with literals having different inferred precessions and scales
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-16735
>                 URL: https://issues.apache.org/jira/browse/SPARK-16735
>             Project: Spark
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0, 2.0.1
>            Reporter: Liang Ke
>         Attachments: SPARK-16735.patch
>
>
> In Spark 2.0, we will parse float literals as decimals. However, it introduces a side-effect, which is described below.
> spark-sql> select map(0.1,0.01, 0.2,0.033);
> Error in query: cannot resolve 'map(CAST(0.1 AS DECIMAL(1,1)), CAST(0.01 AS DECIMAL(2,2)), CAST(0.2 AS DECIMAL(1,1)), CAST(0.033 AS DECIMAL(3,3)))' due to data type mismatch: The given values of function map should all be the same type, but they are [decimal(2,2), decimal(3,3)]; line 1 pos 7



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