-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58627 from ClickHouse/backport/23.12/58595
Backport #58595 to 23.12: Disable max_joined_block_rows in ConcurrentHashJoin
- Loading branch information
Showing
5 changed files
with
81 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
tests/queries/0_stateless/02962_max_joined_block_rows.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
1 0 | ||
1 1 | ||
1 2 | ||
1 3 | ||
1 4 | ||
1 5 | ||
1 6 | ||
1 7 | ||
1 8 | ||
1 9 | ||
-- | ||
1 0 | ||
1 1 | ||
1 2 | ||
1 3 | ||
1 4 | ||
1 5 | ||
1 6 | ||
1 7 | ||
1 8 | ||
1 9 | ||
-- | ||
1 0 | ||
1 1 | ||
1 2 | ||
1 3 | ||
1 4 | ||
1 5 | ||
1 6 | ||
1 7 | ||
1 8 | ||
1 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
DROP TABLE IF EXISTS t1; | ||
DROP TABLE IF EXISTS t2; | ||
|
||
CREATE table t1 (a UInt64, b UInt64) ENGINE = Memory; | ||
INSERT INTO t1 SELECT number % 2, number FROM numbers(10); | ||
|
||
CREATE table t2 (a UInt64) ENGINE = Memory; | ||
|
||
INSERT INTO t2 SELECT number % 2 FROM numbers(10); | ||
|
||
-- block size is always multiple of 5 because we have 5 rows for each key in right table | ||
-- we do not split rows corresponding to the same key | ||
|
||
SELECT max(bs) <= 5, b FROM ( | ||
SELECT blockSize() as bs, * FROM t1 JOIN t2 ON t1.a = t2.a | ||
) GROUP BY b | ||
ORDER BY b | ||
SETTINGS max_joined_block_size_rows = 5; | ||
|
||
SELECT '--'; | ||
|
||
SELECT max(bs) <= 10, b FROM ( | ||
SELECT blockSize() as bs, * FROM t1 JOIN t2 ON t1.a = t2.a | ||
) GROUP BY b | ||
ORDER BY b | ||
SETTINGS max_joined_block_size_rows = 10; | ||
|
||
SELECT '--'; | ||
|
||
-- parallel_hash doen't support max_joined_block_size_rows | ||
|
||
SET join_algorithm = 'parallel_hash'; | ||
|
||
SELECT max(bs) > 10, b FROM ( | ||
SELECT blockSize() as bs, * FROM t1 JOIN t2 ON t1.a = t2.a | ||
) GROUP BY b | ||
ORDER BY b | ||
SETTINGS max_joined_block_size_rows = 10; |