Added a test from @nvartolomei #6229

This commit is contained in:
Alexey Milovidov 2020-04-27 00:09:30 +03:00
parent 11bb3e3afa
commit d40fb6b5d3
2 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,7 @@
123
123
a
a
---
a
a

View File

@ -0,0 +1,50 @@
DROP TABLE IF EXISTS m;
DROP TABLE IF EXISTS d;
CREATE TABLE m
(
`v` UInt8
)
ENGINE = MergeTree()
PARTITION BY tuple()
ORDER BY v;
CREATE TABLE d
(
`v` UInt16
)
ENGINE = Distributed('test_cluster_two_shards', currentDatabase(), m, rand());
INSERT INTO m VALUES (123);
SELECT * FROM d;
DROP TABLE m;
DROP TABLE d;
CREATE TABLE m
(
`v` Enum8('a' = 1, 'b' = 2)
)
ENGINE = MergeTree()
PARTITION BY tuple()
ORDER BY v;
CREATE TABLE d
(
`v` Enum8('a' = 1)
)
ENGINE = Distributed('test_cluster_two_shards', currentDatabase(), m, rand());
INSERT INTO m VALUES ('a');
SELECT * FROM d;
SELECT '---';
INSERT INTO m VALUES ('b');
SELECT v FROM d ORDER BY v; -- { clientError 36 }
DROP TABLE m;
DROP TABLE d;