Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug from pull request 4042 #4190

Merged
merged 1 commit into from
Mar 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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