Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 2.0
-
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.