未验证 提交 1d98441c 编写于 作者: A alexey-milovidov 提交者: GitHub

Update ExpressionAnalyzer.cpp

上级 cbc0f56a
......@@ -852,13 +852,16 @@ bool ExpressionAnalyzer::appendLimitBy(ExpressionActionsChain & chain, bool only
NameSet aggregated_names;
for (const auto & column : aggregated_columns)
{
step.required_output.push_back(column.name);
aggregated_names.insert(column.name);
step.required_output.push_back(column.name);
aggregated_names.insert(column.name);
}
for (const auto & child : select_query->limitBy()->children)
if (!aggregated_names.count(child->getColumnName()))
step.required_output.push_back(child->getColumnName());
{
auto child_name = child->getColumnName();
if (!aggregated_names.count(child_name))
step.required_output.push_back(std::move(child_name));
}
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册