Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
ghx-label-11
Description
I tried to insert rows very big bigints, and it worked as expected with big integers (error message, no new row stored), but it didn’t work as expected with ridiculously big integers( no error message, stored incorrect value). Here are the commands used:
drop TABLE my_first_table2; CREATE TABLE my_first_table2 ( id BIGINT, name STRING, PRIMARY KEY(id) ); INSERT INTO my_first_table2 VALUES (cast(9 as BIGINT), "sarah"); -- this works just fine as expected INSERT INTO my_first_table2 VALUES (cast(9999999999999999999999 as BIGINT), "sarah"); -- ERROR: UDF ERROR: Decimal expression overflowed which is expected since it is over bigint max value (source: https://impala.apache.org/docs/build/plain-html/topics/impala_bigint.html#:~:text=Range%3A%20%2D9223372036854775808%20..,9223372036854775807. ) INSERT INTO my_first_table2 VALUES (cast(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 as BIGINT), "sarah"); -- this succeeds and doesn't throw the same error as the previous command which is concerning select * from my_first_table2; -- there are two rows in the table, and the id is incorrect in one of them
Attachments
Issue Links
- relates to
-
IMPALA-12950 Improve error message in case of out-of-range numeric conversions
- Resolved