You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Alex Rodoni (JIRA)" <ji...@apache.org> on 2018/08/30 18:35:00 UTC
[jira] [Updated] (IMPALA-6183) Converting Decimal to Double loses
precision
[ https://issues.apache.org/jira/browse/IMPALA-6183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Rodoni updated IMPALA-6183:
--------------------------------
Docs Text: (was: Flag this in release notes as an "incompatible change".)
> Converting Decimal to Double loses precision
> --------------------------------------------
>
> Key: IMPALA-6183
> URL: https://issues.apache.org/jira/browse/IMPALA-6183
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Affects Versions: Impala 2.7.0, Impala 2.8.0, Impala 2.9.0, Impala 2.10.0, Impala 2.11.0
> Reporter: Taras Bobrovytsky
> Assignee: Taras Bobrovytsky
> Priority: Major
> Fix For: Impala 2.11.0
>
>
> The following query returns a correct result:
> {code}
> select cast(1.1112223334445559 as double)
> {code}
> Result:
> {code}
> 1.111222333444556
> {code}
> However, if we first convert the literal to a decimal, we lose precision.
> {code}
> select cast(cast(1.1112223334445559 as decimal(38, 37)) as double)
> {code}
> Result:
> {code}
> 1.111222340799091
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org