mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
fix iterating over list
This commit is contained in:
parent
47c1bb3416
commit
a36c387e4e
@ -506,12 +506,15 @@ bool ColumnsDescription::hasColumnOrSubcolumn(GetFlags flags, const String & col
|
|||||||
|
|
||||||
void ColumnsDescription::addSubcolumnsToList(NamesAndTypesList & source_list) const
|
void ColumnsDescription::addSubcolumnsToList(NamesAndTypesList & source_list) const
|
||||||
{
|
{
|
||||||
|
NamesAndTypesList subcolumns_list;
|
||||||
for (const auto & col : source_list)
|
for (const auto & col : source_list)
|
||||||
{
|
{
|
||||||
auto range = subcolumns.get<1>().equal_range(col.name);
|
auto range = subcolumns.get<1>().equal_range(col.name);
|
||||||
if (range.first != range.second)
|
if (range.first != range.second)
|
||||||
source_list.insert(source_list.end(), range.first, range.second);
|
subcolumns_list.insert(subcolumns_list.end(), range.first, range.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
source_list.splice(source_list.end(), std::move(subcolumns_list));
|
||||||
}
|
}
|
||||||
|
|
||||||
NamesAndTypesList ColumnsDescription::getAllWithSubcolumns() const
|
NamesAndTypesList ColumnsDescription::getAllWithSubcolumns() const
|
||||||
|
Loading…
Reference in New Issue
Block a user