Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
ghx-label-3
Description
Currently, for text-based formats with decimal type, Impala will return {{NULL }}if values do not fit within the precision and scale, but hive will return a approximation. For example, we execute following statements:
create table text_decimals (x string); insert into text_decimals values ("1"), ("2"), ("99.99"), ("1.234"), ("000001"), ("1.000000000"); alter table text_decimals replace columns (x decimal(4,2));
If we query table by Impala, we will get NULL for line 4 and 6, but if we use Hive, we can get 1.23 and 1.00. So shall we add a new query option to control approximate calculation? If we set true, Impala will also return approximation like Hive, if set false, return NULL.