mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Merge remote-tracking branch 'origin' into cleanup-build
This commit is contained in:
commit
9d044db183
19
tests/queries/0_stateless/02177_issue_31009.sql
Normal file
19
tests/queries/0_stateless/02177_issue_31009.sql
Normal file
@ -0,0 +1,19 @@
|
||||
-- Tags: long
|
||||
|
||||
CREATE TABLE left ( key UInt32, value String ) ENGINE = MergeTree ORDER BY key;
|
||||
CREATE TABLE right ( key UInt32, value String ) ENGINE = MergeTree ORDER BY tuple();
|
||||
|
||||
INSERT INTO left SELECT number, toString(number) FROM numbers(25367182);
|
||||
INSERT INTO right SELECT number, toString(number) FROM numbers(23124707);
|
||||
|
||||
SET join_algorithm = 'partial_merge';
|
||||
|
||||
SELECT key, count(1) AS cnt
|
||||
FROM (
|
||||
SELECT data.key
|
||||
FROM ( SELECT key FROM left AS s ) AS data
|
||||
LEFT JOIN ( SELECT key FROM right GROUP BY key ) AS promo ON promo.key = data.key
|
||||
) GROUP BY key HAVING count(1) > 1;
|
||||
|
||||
DROP TABLE IF EXISTS left;
|
||||
DROP TABLE IF EXISTS right;
|
Loading…
Reference in New Issue
Block a user