mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
Update tests
This commit is contained in:
parent
f5c81a5c72
commit
06405531a1
@ -1,7 +1,7 @@
|
||||
DROP TABLE IF EXISTS insert;
|
||||
CREATE TABLE insert (i UInt64, s String, u UUID, d Date, t DateTime, a Array(UInt32)) ENGINE = Memory;
|
||||
|
||||
INSERT INTO insert VALUES (1, 'Hello', 'ab41bdd6-5cd4-11e7-907b-a6006ad3dba0', '2016-01-01', '2016-01-02 03:04:05', [1, 2, 3]), (1 + 1, concat('Hello', ', world'), toUUID(0), toDate('2016-01-01') + 1, toStartOfMinute(toDateTime('2016-01-02 03:04:05')), [[0,1],[2]][1]), (round(pi()), concat('hello', ', world!'), toUUID(toString('ab41bdd6-5cd4-11e7-907b-a6006ad3dba0')), toDate(toDateTime('2016-01-03 03:04:05')), toStartOfHour(toDateTime('2016-01-02 03:04:05')), []), (4, 'World', 'ab41bdd6-5cd4-11e7-907b-a6006ad3dba0', '2016-01-04', '2016-12-11 10:09:08', [3,2,1]);
|
||||
INSERT INTO insert VALUES (1, 'Hello', 'ab41bdd6-5cd4-11e7-907b-a6006ad3dba0', '2016-01-01', '2016-01-02 03:04:05', [1, 2, 3]), (1 + 1, concat('Hello', ', world'), toUUID('00000000-0000-0000-0000-000000000000'), toDate('2016-01-01') + 1, toStartOfMinute(toDateTime('2016-01-02 03:04:05')), [[0,1],[2]][1]), (round(pi()), concat('hello', ', world!'), toUUID(toString('ab41bdd6-5cd4-11e7-907b-a6006ad3dba0')), toDate(toDateTime('2016-01-03 03:04:05')), toStartOfHour(toDateTime('2016-01-02 03:04:05')), []), (4, 'World', 'ab41bdd6-5cd4-11e7-907b-a6006ad3dba0', '2016-01-04', '2016-12-11 10:09:08', [3,2,1]);
|
||||
|
||||
SELECT * FROM insert ORDER BY i;
|
||||
DROP TABLE insert;
|
||||
|
@ -95,7 +95,6 @@ value vs value
|
||||
2000-01-01 2000-01-01 00:00:01 2000-01-01 00:00:01 Date DateTime(\'Europe/Moscow\') DateTime
|
||||
2000-01-01 00:00:00 2000-01-02 2000-01-02 00:00:00 DateTime(\'Europe/Moscow\') Date DateTime
|
||||
1970-01-01 03:00:00 1970-01-01 03:00:01 1970-01-01 03:00:01 DateTime(\'Europe/Moscow\') DateTime(\'Europe/Moscow\') DateTime(\'Europe/Moscow\')
|
||||
00000000-0000-0000-0000-000000000000 00000000-0000-0001-0000-000000000000 00000000-0000-0001-0000-000000000000 UUID UUID UUID
|
||||
column vs value
|
||||
0 1 1 Int8 Int8 Int8
|
||||
0 1 1 Int8 Int16 Int16
|
||||
@ -169,4 +168,3 @@ column vs value
|
||||
2000-01-01 2000-01-01 00:00:01 2000-01-01 00:00:01 Date DateTime(\'Europe/Moscow\') DateTime
|
||||
2000-01-01 00:00:00 2000-01-02 2000-01-02 00:00:00 DateTime(\'Europe/Moscow\') Date DateTime
|
||||
1970-01-01 03:00:00 1970-01-01 03:00:01 1970-01-01 03:00:01 DateTime(\'Europe/Moscow\') DateTime(\'Europe/Moscow\') DateTime(\'Europe/Moscow\')
|
||||
00000000-0000-0000-0000-000000000000 00000000-0000-0001-0000-000000000000 00000000-0000-0001-0000-000000000000 UUID UUID UUID
|
||||
|
@ -4,7 +4,6 @@
|
||||
1 Nullable(Int32)
|
||||
2 Nullable(Float32)
|
||||
2 Nullable(UInt8)
|
||||
00000000-0000-0002-0000-000000000000 Nullable(UUID)
|
||||
3 Nullable(Int32)
|
||||
\N Nullable(Int32)
|
||||
42 Nullable(Int32)
|
||||
|
@ -10,7 +10,6 @@ SELECT CAST(toNullable(toInt8(1)) AS Int32) as x, toTypeName(x);
|
||||
|
||||
SELECT CAST(toNullable(toFloat32(2)), 'Float32') as x, toTypeName(x);
|
||||
SELECT CAST(toNullable(toFloat32(2)), 'UInt8') as x, toTypeName(x);
|
||||
SELECT CAST(toNullable(toFloat32(2)), 'UUID') as x, toTypeName(x);
|
||||
|
||||
SELECT CAST(if(1 = 1, toNullable(toInt8(3)), NULL) AS Int32) as x, toTypeName(x);
|
||||
SELECT CAST(if(1 = 0, toNullable(toInt8(3)), NULL) AS Int32) as x, toTypeName(x);
|
||||
|
@ -7,6 +7,6 @@
|
||||
1
|
||||
1
|
||||
2
|
||||
00000000-0000-0001-0000-000000000000
|
||||
00000000-0000-0001-0000-000000000000
|
||||
00000000-0000-0002-0000-000000000000
|
||||
00000000-0000-0000-0000-000000000001
|
||||
00000000-0000-0000-0000-000000000001
|
||||
00000000-0000-0000-0000-000000000002
|
||||
|
@ -19,7 +19,7 @@ SELECT x FROM 01154_test WHERE x IN (1, 2);
|
||||
DROP TABLE 01154_test;
|
||||
|
||||
CREATE TABLE 01154_test (x UUID, INDEX ix_x x TYPE bloom_filter(0.01) GRANULARITY 1) ENGINE = MergeTree() ORDER BY x SETTINGS index_granularity=8192;
|
||||
INSERT INTO 01154_test VALUES (toUUID(1)), (toUUID(2)), (toUUID(3));
|
||||
SELECT x FROM 01154_test WHERE x = toUUID(1);
|
||||
SELECT x FROM 01154_test WHERE x IN (toUUID(1), toUUID(2));
|
||||
INSERT INTO 01154_test VALUES (toUUID('00000000-0000-0000-0000-000000000001')), (toUUID('00000000-0000-0000-0000-000000000002')), (toUUID('00000000-0000-0000-0000-000000000003'));
|
||||
SELECT x FROM 01154_test WHERE x = toUUID('00000000-0000-0000-0000-000000000001');
|
||||
SELECT x FROM 01154_test WHERE x IN (toUUID('00000000-0000-0000-0000-000000000001'), toUUID('00000000-0000-0000-0000-000000000002'));
|
||||
DROP TABLE 01154_test;
|
||||
|
Loading…
Reference in New Issue
Block a user