You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Taras Bobrovytsky (JIRA)" <ji...@apache.org> on 2018/01/19 23:18:00 UTC

[jira] [Created] (IMPALA-6429) Decimal V2 division returns an incorrect result

Taras Bobrovytsky created IMPALA-6429:
-----------------------------------------

             Summary: Decimal V2 division returns an incorrect result
                 Key: IMPALA-6429
                 URL: https://issues.apache.org/jira/browse/IMPALA-6429
             Project: IMPALA
          Issue Type: Bug
          Components: Backend
    Affects Versions: Impala 2.11.0
            Reporter: Taras Bobrovytsky


This bug was found by the decimal fuzzer in one of our exhaustive nigthly builds.

Query:
{code:java}
select cast(9269574547799442144750864826042582 as decimal(38,2)) / cast(-0.2475880078570760549798248447 as decimal(38,38))
{code}
Result:
{code:java}
-25071524537367060442348433289920.875272
{code}
The expected results should be around:
{code:java}
-37439513440208481766456680165938338.924
{code}
I computed the expected result in Python. Even without a calculator, it should be obvious that the first digit of the expected result should be higher than 2.



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