Skip to content

Commit

Permalink
[GLUTEN-6768][CH] Clear mixed join contition to avoid uneccessary dat…
Browse files Browse the repository at this point in the history
…a copy apache#6769

What changes were proposed in this pull request?
(Please fill in changes proposed in this fix)

Fixes: apache#6768

The mixed join condition doesn't clear the unused input columns, this will cause uneccessary data copy during joining.

It's one of the issues which are noticed in apache#6768

How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)

unit tests

(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
  • Loading branch information
lgbo-ustc authored Aug 9, 2024
1 parent 9251078 commit 9717568
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpp-ch/local-engine/Parser/JoinRelParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ bool JoinRelParser::applyJoinFilter(
if (!allow_mixed_condition)
return false;
auto mixed_join_expressions_actions = expressionsToActionsDAG({expr}, mixed_header);
mixed_join_expressions_actions.removeUnusedActions();
table_join.getMixedJoinExpression()
= std::make_shared<DB::ExpressionActions>(std::move(mixed_join_expressions_actions), ExpressionActionsSettings::fromContext(context));
}
Expand Down

0 comments on commit 9717568

Please sign in to comment.