mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
add tests
This commit is contained in:
parent
1ba71c20fd
commit
e264b4dcba
29
tests/queries/0_stateless/02114_bool_type.reference
Normal file
29
tests/queries/0_stateless/02114_bool_type.reference
Normal file
@ -0,0 +1,29 @@
|
||||
CREATE TABLE test.bool_test\n(\n `value` Bool\n)\nENGINE = Memory
|
||||
false
|
||||
true
|
||||
false
|
||||
true
|
||||
false
|
||||
true
|
||||
false
|
||||
true
|
||||
{"value":false}
|
||||
{"value":true}
|
||||
{"value":false}
|
||||
{"value":true}
|
||||
{"value":false}
|
||||
{"value":true}
|
||||
{"value":false}
|
||||
{"value":true}
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
true
|
||||
true
|
||||
true
|
||||
true
|
16
tests/queries/0_stateless/02114_bool_type.sql
Normal file
16
tests/queries/0_stateless/02114_bool_type.sql
Normal file
@ -0,0 +1,16 @@
|
||||
DROP TABLE IF EXISTS test.bool_test;
|
||||
|
||||
CREATE TABLE test.bool_test (value Bool) ENGINE = Memory;
|
||||
|
||||
-- value column shoud have type 'Bool'
|
||||
SHOW CREATE TABLE test.bool_test;
|
||||
|
||||
INSERT INTO test.bool_test (value) VALUES ('false'), ('true'), (0), (1);
|
||||
INSERT INTO test.bool_test (value) FORMAT JSONEachRow {"value":false}{"value":true}{"value":0}{"value":1}
|
||||
|
||||
SELECT value FROM test.bool_test;
|
||||
SELECT value FROM test.bool_test FORMAT JSONEachRow;
|
||||
SELECT toUInt64(value) FROM test.bool_test;
|
||||
SELECT value FROM test.bool_test where value > 0;
|
||||
|
||||
DROP TABLE IF EXISTS test.bool_test;
|
Loading…
Reference in New Issue
Block a user