Revert "Revert "Add a test for #47892""

This commit is contained in:
Alexey Milovidov 2024-08-06 03:17:17 +02:00 committed by GitHub
parent 8e19f46829
commit 087d014f2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,3 @@
[NULL] [] 100 0
[NULL] [] 100 0

View File

@ -0,0 +1,15 @@
SET max_bytes_in_join = 0, join_algorithm = 'full_sorting_merge', max_block_size = 10240;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
CREATE TABLE t1 (`key` UInt32, `s` String) ENGINE = MergeTree ORDER BY key;
CREATE TABLE t2 (`key` UInt32, `s` String) ENGINE = MergeTree ORDER BY key;
INSERT INTO t1 SELECT (sipHash64(number, 'x') % 10000000) + 1 AS key, concat('val', toString(number)) AS s FROM numbers_mt(10000000);
INSERT INTO t2 SELECT (sipHash64(number, 'y') % 1000000) + 1 AS key, concat('val', toString(number)) AS s FROM numbers_mt(1000000);
SELECT materialize([NULL]), [], 100, count(materialize(NULL)) FROM t1 ALL INNER JOIN t2 ON t1.key = t2.key PREWHERE 10 WHERE t2.key WITH TOTALS;
DROP TABLE t1;
DROP TABLE t2;