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

29 lines
749 B
Text

# All SQL syntaxes that result in storing a u64.
statement ok
CREATE TABLE kanto.myschema.mytable (a BIGINT UNSIGNED);
query I rowsort
SELECT column_name, data_type FROM myschema.information_schema.columns WHERE table_catalog='kanto';
----
a UInt64
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 (0);
statement error ^Arrow error: Cast error: Can't cast value -1 to type UInt64$
INSERT INTO kanto.myschema.mytable VALUES (-1);
statement ok
INSERT INTO kanto.myschema.mytable VALUES (18446744073709551615);
statement ok
INSERT INTO kanto.myschema.mytable VALUES (CAST('18446744073709551615' AS BIGINT UNSIGNED));