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)

Reply via email to