From 8c2fa32a5a6076475036eb03801a011c01cd0bbe Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 14 Dec 2023 13:04:47 +0000 Subject: [PATCH] Keep old actions --- src/Planner/PlannerJoins.cpp | 4 ++-- src/Planner/PlannerJoins.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Planner/PlannerJoins.cpp b/src/Planner/PlannerJoins.cpp index fb7a4262c5a..830d7135f6f 100644 --- a/src/Planner/PlannerJoins.cpp +++ b/src/Planner/PlannerJoins.cpp @@ -615,10 +615,10 @@ JoinClausesAndActions buildJoinClausesAndActions(//const ColumnsWithTypeAndName } } - result.left_join_expressions_actions = std::move(left_join_actions); + result.left_join_expressions_actions = left_join_actions->clone(); result.left_join_expressions_actions->removeUnusedActions(join_left_actions_names); - result.right_join_expressions_actions = std::move(right_join_actions); + result.right_join_expressions_actions = right_join_actions->clone(); result.right_join_expressions_actions->removeUnusedActions(join_right_actions_names); return result; diff --git a/src/Planner/PlannerJoins.h b/src/Planner/PlannerJoins.h index 63fb18f6f82..7bc65cfb544 100644 --- a/src/Planner/PlannerJoins.h +++ b/src/Planner/PlannerJoins.h @@ -165,7 +165,8 @@ struct JoinClausesAndActions /// Join clauses. Actions dag nodes point into join_expression_actions. JoinClauses join_clauses; /// Whole JOIN ON section expressions - //ActionsDAGPtr join_expression_actions; + ActionsDAGPtr left_join_tmp_expression_actions; + ActionsDAGPtr right_join_tmp_expression_actions; /// Left join expressions actions ActionsDAGPtr left_join_expressions_actions; /// Right join expressions actions