Skip to content

Commit

Permalink
Fix bug that copy ExpressionActionsChain's last step by value, not by…
Browse files Browse the repository at this point in the history
… reference. (#3487)
  • Loading branch information
fuzhe1989 authored Nov 20, 2021
1 parent e655a42 commit c3c0bb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ void DAGExpressionAnalyzer::appendAggSelect(ExpressionActionsChain & chain, cons
initChain(chain, getCurrentInputColumns());
bool need_update_aggregated_columns = false;
std::vector<NameAndTypePair> updated_aggregated_columns;
ExpressionActionsChain::Step step = chain.steps.back();
ExpressionActionsChain::Step & step = chain.steps.back();
for (Int32 i = 0; i < aggregation.agg_func_size(); i++)
{
String & name = aggregated_columns[i].name;
Expand Down Expand Up @@ -1236,7 +1236,7 @@ NamesWithAliases DAGExpressionAnalyzer::appendFinalProject(
/// for all the columns that need to be returned, if the type is timestamp, then convert
/// the timestamp column to UTC based, refer to appendTimeZoneCastsAfterTS for more details
initChain(chain, getCurrentInputColumns());
ExpressionActionsChain::Step step = chain.steps.back();
ExpressionActionsChain::Step & step = chain.steps.back();

tipb::Expr tz_expr;
constructTZExpr(tz_expr, context.getTimezoneInfo(), false);
Expand Down

0 comments on commit c3c0bb7

Please sign in to comment.