Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 1.4.1
-
CentOS release 6.6 (Final)
Description
When I try to run a query with WHERE clause and value for a column in DECIMAL data type is too long (more than 19 digits), then I get following error message:
Error: AnalysisException: Literal '12345678901234567890' exceeds maximum range of integers. (state=HY000,code=0)
i.e.
Lets say we have table TTT (column VAL defined as DECIMAL(38,0)):
VAL |
---|
1234567890123456789 |
12345678901234567890 |
Then if I will run:
select * from TTT where VAL=1234567890123456789;
Returns correct result
select * from TTT where VAL=12345678901234567890;
Gives:
Error: AnalysisException: Literal '12345678901234567890' exceeds maximum range of integers. (state=HY000,code=0)
The only workaround I found is to cast the value:
select * from TTT where VAL=cast(‘12345678901234567890’,DECIMAL(38,0));
But I think this is not good.
N.B. Hive performs casting on fly, but you need to put your value in quotes.