Skip to content

Commit

Permalink
fix bug from pull request 4042 (#4190)
Browse files Browse the repository at this point in the history
ref #4118
  • Loading branch information
SeaRise committed Mar 7, 2022
1 parent 7a9be88 commit acae5c1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,11 @@ std::tuple<Names, TiDB::TiDBCollators, AggregateDescriptions, ExpressionActionsP
chain.finalize();
chain.clear();

initChain(chain, getCurrentInputColumns());
const auto & actions = chain.getLastActions();
appendCastAfterAgg(actions, agg);
auto & after_agg_step = initAndGetLastStep(chain);
appendCastAfterAgg(after_agg_step.actions, agg);
// after appendCastAfterAgg, current input columns has been modified.
for (const auto & column : getCurrentInputColumns())
step.required_output.push_back(column.name);
after_agg_step.required_output.push_back(column.name);

return {aggregation_keys, collators, aggregate_descriptions, before_agg};
}
Expand Down

0 comments on commit acae5c1

Please sign in to comment.