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

23 lines
629 B
Text

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