Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0-beta1
-
None
-
Docs Required, Release Notes Required
Description
A simple scenario:
create table test_e011_INTEGER_from (key_field INT PRIMARY KEY, field1 INTEGER); insert into test_e011_INTEGER_from (key_field, field1) values (1, -2147483648); create table test_e011_SMALLINT (key_field INT PRIMARY KEY, field1_SMALLINT SMALLINT); insert into test_e011_SMALLINT (key_field, field1_SMALLINT) values (1, (select field1 from test_e011_INTEGER_from where key_field=1)); select * from test_e011_SMALLINT;
I expect it either to return '1, null' (like in postrgres or sqlite3) or to raise an error on insert (like in GG8) as value of -2147483648 is out of bounds for SMALLINT data type.
Instead, '1, 0' is stored within test_e011_SMALLINT table and returned from select. In other words, -2147483648 was converted into 0. Such behavior seems as incorrect.
Attachments
Issue Links
- duplicates
-
IGNITE-16181 Calcite engine. Handle arithmetic overflows
- Resolved