Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-6429

Decimal division returns an incorrect result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • Impala 2.11.0
    • Impala 3.0
    • Backend
    • ghx-label-5

    Description

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

      Query:

      select cast(9269574547799442144750864826042582 as decimal(38,2)) / cast(-0.2475880078570760549798248447 as decimal(38,38))
      

      Result:

      -25071524537367060442348433289920.875272
      

      The expected results should be around:

      -37439513440208481766456680165938338.924
      

      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.

      Attachments

        Activity

          People

            tarasbob Taras Bobrovytsky
            tarasbob Taras Bobrovytsky
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: