drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arina Ielchiieva (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-6471) Different result for CAST String and Decimal literals as Decimal
Date Fri, 13 Jul 2018 12:57:00 GMT

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

Arina Ielchiieva resolved DRILL-6471.
-------------------------------------
    Resolution: Fixed

Merged into master with commit id c39ba74796d1f47887306ae81aa70ccf454effb3.

> Different result for CAST String and Decimal literals as Decimal
> ----------------------------------------------------------------
>
>                 Key: DRILL-6471
>                 URL: https://issues.apache.org/jira/browse/DRILL-6471
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.14.0
>            Reporter: Denys Ordynskiy
>            Assignee: Volodymyr Vysotskyi
>            Priority: Major
>             Fix For: 1.14.0
>
>
> If I cast String and Decimal literals as Decimal and literalĀ precision is more than
I casting to,
> I see different results for the same literal data in String and Decimal formats
> SELECT cast('1234.5678' as DECIMAL(2, 2));
> {code:java}
> +----------+
> | EXPR$0   |
> +----------+
> | 1200.00  |
> +----------+
> {code}
> SELECT cast(1234.5678 as DECIMAL(2, 2));
> {code:java}
> +---------+
> | EXPR$0  |
> +---------+
> | 0.12    |
> +---------+
> {code}
> CAST result forĀ one number in String and Decimal formats should be the same.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message