mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
tests
This commit is contained in:
parent
dc13d2e4a7
commit
e8f6497f74
14
dbms/tests/queries/0_stateless/00962_enumNotExect.reference
Normal file
14
dbms/tests/queries/0_stateless/00962_enumNotExect.reference
Normal file
@ -0,0 +1,14 @@
|
||||
hello
|
||||
world
|
||||
hello
|
||||
1
|
||||
2
|
||||
1
|
||||
hello
|
||||
world
|
||||
hello
|
||||
1
|
||||
128
|
||||
1
|
||||
Enum16(\'a\' = 2, \'b\' = 128)
|
||||
Enum8(\'a\' = 2, \'b\' = 127)
|
13
dbms/tests/queries/0_stateless/00962_enumNotExect.sql
Normal file
13
dbms/tests/queries/0_stateless/00962_enumNotExect.sql
Normal file
@ -0,0 +1,13 @@
|
||||
DROP TABLE IF EXISTS t_enum8;
|
||||
CREATE TABLE t_enum8( x Enum('hello' = 1, 'world' = 2) ) ENGINE = TinyLog;
|
||||
INSERT INTO t_enum8 Values('hello'),('world'),('hello');
|
||||
SELECT * FROM t_enum8;
|
||||
SELECT CAST(x, 'Int8') FROM t_enum8;
|
||||
DROP TABLE IF EXISTS t_enum16;
|
||||
CREATE TABLE t_enum16( x Enum('hello' = 1, 'world' = 128) ) ENGINE = TinyLog;
|
||||
INSERT INTO t_enum16 Values('hello'),('world'),('hello');
|
||||
SELECT * FROM t_enum16;
|
||||
SELECT CAST(x, 'Int16') FROM t_enum16;
|
||||
SELECT toTypeName(CAST('a', 'Enum(\'a\' = 2, \'b\' = 128)'));
|
||||
SELECT toTypeName(CAST('a', 'Enum(\'a\' = 2, \'b\' = 127)'));
|
||||
|
Loading…
Reference in New Issue
Block a user