mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
clickhouse: fixed ExpressionAnalyzer [#CONV-7444].
This commit is contained in:
parent
f59d6e3320
commit
c2455e1182
@ -1027,18 +1027,21 @@ void ExpressionAnalyzer::removeUnusedColumns()
|
||||
if (required.empty())
|
||||
required.insert(ExpressionActions::getSmallestColumn(columns));
|
||||
|
||||
unknown_required_columns = required;
|
||||
|
||||
for (NamesAndTypesList::iterator it = columns.begin(); it != columns.end();)
|
||||
{
|
||||
NamesAndTypesList::iterator it0 = it;
|
||||
++it;
|
||||
|
||||
unknown_required_columns.erase(it0->first);
|
||||
|
||||
if (!required.count(it0->first))
|
||||
{
|
||||
required.erase(it0->first);
|
||||
columns.erase(it0);
|
||||
}
|
||||
}
|
||||
|
||||
unknown_required_columns = required;
|
||||
}
|
||||
|
||||
Names ExpressionAnalyzer::getRequiredColumns()
|
||||
|
Loading…
Reference in New Issue
Block a user