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

Impala incorrectly handles double numbers with more than 19 significant decimal digits

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 2.0
    • Impala 2.2
    • None

    Description

      I have created the following table:

      create external table dev.impala_precision_test(
      c1 String,
      c2 Double
      )
      row format delimited fields terminated by '|'
      location '/user/battaglias/impala_precision_test';

      on a text file with these 2 rows of data:

      a|1.12345678912345678912
      b|1.1234567891234567891

      The first number has 20 significant decimal digits, the second one 19.

      This is the result retrieved by Impala (impala-shell), where the first number is incorrectly represented:

      select *
      from dev.impala_precision_test

      c1 c2
      a 0.9389893483863613
      b 1.123456789123457

      This is instead the result from Hive (Beeline shell), where both numbers are correctly rounded-off:

      impala_double_bug.c1 impala_double_bug.c2
      a 1.1234567891234568
      b 1.1234567891234568

      Also float data type, in Impala, seem suffer from the same problem.

      Attachments

        Activity

          People

            skye Skye Wanderman-Milne
            simobatt@gmail.com Simone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: