1
Fork 0
kantodb/testdata/sql/datatype_i32_int4.slt

29 lines
795 B
Text

# All SQL syntaxes that result in storing a i32.
statement ok
CREATE TABLE kanto.myschema.mytable (a INT4);
query I rowsort
SELECT column_name, data_type FROM myschema.information_schema.columns WHERE table_catalog='kanto';
----
a Int32
statement ok
INSERT INTO kanto.myschema.mytable VALUES (-1);
query I rowsort
SELECT * FROM kanto.myschema.mytable;
----
-1
statement ok
INSERT INTO kanto.myschema.mytable VALUES (-2147483648);
statement ok
INSERT INTO kanto.myschema.mytable VALUES (2147483647);
statement error ^Arrow error: Cast error: Can't cast value -2147483649 to type Int32$
INSERT INTO kanto.myschema.mytable VALUES (-2147483648-1);
statement error ^Arrow error: Cast error: Can't cast value 2147483648 to type Int32$
INSERT INTO kanto.myschema.mytable VALUES (2147483647+1);