mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Backport #63755 to 24.3: Fix ILLEGAL_COLUMN in partial_merge join
This commit is contained in:
parent
a3c1ba35b1
commit
3b0da30568
@ -700,7 +700,9 @@ void MergeJoin::joinBlock(Block & block, ExtraBlockPtr & not_processed)
|
||||
/// We need to check type of masks before `addConditionJoinColumn`, because it assumes that types is correct
|
||||
JoinCommon::checkTypesOfMasks(block, mask_column_name_left, right_sample_block, mask_column_name_right);
|
||||
|
||||
/// Add auxiliary column, will be removed after joining
|
||||
if (!not_processed)
|
||||
/// Add an auxiliary column, which will be removed after joining
|
||||
/// We do not need to add it twice when we are continuing to process the block from the previous iteration
|
||||
addConditionJoinColumn(block, JoinTableSide::Left);
|
||||
|
||||
/// Types of keys can be checked only after `checkTypesOfKeys`
|
||||
|
@ -0,0 +1 @@
|
||||
9900 49990050 49990050 49990050
|
@ -0,0 +1,8 @@
|
||||
SET join_algorithm = 'partial_merge';
|
||||
SET max_joined_block_size_rows = 100;
|
||||
|
||||
|
||||
SELECT count(ignore(*)), sum(t1.a), sum(t1.b), sum(t2.a)
|
||||
FROM ( SELECT number AS a, number AS b FROM numbers(10000) ) t1
|
||||
JOIN ( SELECT number + 100 AS a FROM numbers(10000) ) t2
|
||||
ON t1.a = t2.a AND t1.b > 0;
|
Loading…
Reference in New Issue
Block a user