You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Denys Ordynskiy (JIRA)" <ji...@apache.org> on 2019/07/08 15:59:00 UTC
[jira] [Closed] (DRILL-6471) Different result for CAST String and
Decimal literals as Decimal
[ https://issues.apache.org/jira/browse/DRILL-6471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denys Ordynskiy closed DRILL-6471.
----------------------------------
> 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)