Sheng Wang created IMPALA-10321:
-----------------------------------
Summary: Add a query option to get approximation when decimal
value not fit column precision and scale
Key: IMPALA-10321
URL: https://issues.apache.org/jira/browse/IMPALA-10321
Project: IMPALA
Issue Type: Improvement
Components: Backend
Reporter: Sheng Wang
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:
{code:java}
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));
{code}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]