You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Arina Ielchiieva (JIRA)" <ji...@apache.org> on 2018/07/13 12:57:00 UTC
[jira] [Resolved] (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 ]
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)