Merge pull request #25390 from ClickHouse/add-test-23163

Add a test for #23163
This commit is contained in:
alexey-milovidov 2021-06-17 20:08:35 +03:00 committed by GitHub
commit d8174cb9fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
DROP TABLE IF EXISTS abc;
CREATE TABLE abc
(
`f1` String,
`f2` String
)
ENGINE = MergeTree()
ORDER BY f1;
-- In version 20.12 this query sometimes produces an exception "Cannot find column"
SELECT f2 FROM merge(currentDatabase(), '^abc$') PREWHERE _table = 'abc' AND f1 = 'a' AND rand() % 100 < 20;
SELECT f2 FROM merge(currentDatabase(), '^abc$') PREWHERE _table = 'abc' AND f1 = 'a';
DROP TABLE abc;