Denys Ordynskiy created DRILL-6471:
--------------------------------------

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


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)

Reply via email to