Merge pull request #17541 from ClickHouse/add-test-engine-join-uuid

Add a test for StorageJoin and UUID
This commit is contained in:
alexey-milovidov 2020-11-29 21:15:40 +03:00 committed by GitHub
commit 5a1ebb5722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1 @@
00000000-0000-0000-0000-000000000000

View File

@ -0,0 +1,29 @@
-- the test from simPod, https://github.com/ClickHouse/ClickHouse/issues/5608
DROP TABLE IF EXISTS joint; -- the table name from the original issue.
DROP TABLE IF EXISTS t;
CREATE TABLE IF NOT EXISTS joint
(
id UUID,
value LowCardinality(String)
)
ENGINE = Join (ANY, LEFT, id);
CREATE TABLE IF NOT EXISTS t
(
id UUID,
d DateTime
)
ENGINE = MergeTree
PARTITION BY toDate(d)
ORDER BY id;
insert into joint VALUES ('00000000-0000-0000-0000-000000000000', 'yo');
insert into t VALUES ('00000000-0000-0000-0000-000000000000', now());
SELECT id FROM t
ANY LEFT JOIN joint ON t.id = joint.id;
DROP TABLE joint;
DROP TABLE t;