You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Bakai Ádám (Jira)" <ji...@apache.org> on 2023/03/31 10:33:00 UTC
[jira] [Created] (IMPALA-12035) impala-shell accepts very big numbers but fails to store them correctly
Bakai Ádám created IMPALA-12035:
-----------------------------------
Summary: impala-shell accepts very big numbers but fails to store them correctly
Key: IMPALA-12035
URL: https://issues.apache.org/jira/browse/IMPALA-12035
Project: IMPALA
Issue Type: Bug
Reporter: Bakai Ádám
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:
{code:java}
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 {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org