MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / collect

Function collect

src/DataTypes/NestedUtils.cpp:495–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495NamesAndTypesList collect(const NamesAndTypesList & names_and_types)
496{
497 NamesAndTypesList res;
498 auto nested_types = getSubcolumnsOfNested(names_and_types);
499
500 for (const auto & name_type : names_and_types)
501 {
502 auto split = splitName(name_type.name);
503 if (!isArray(name_type.type) || split.second.empty() || !nested_types.contains(split.first))
504 res.push_back(name_type);
505 }
506
507 for (const auto & name_type : nested_types)
508 res.emplace_back(name_type.first, name_type.second);
509
510 return res;
511}
512
513NamesAndTypesList convertToSubcolumns(const NamesAndTypesList & names_and_types)
514{

Callers 14

globMethod · 0.85
collectMethod · 0.85
StorageLogMethod · 0.85
GenerateSourceClass · 0.85
inspectDeleteBitmapFunction · 0.85
orcColumnsToCHChunkMethod · 0.85
arrowColumnsToCHChunkMethod · 0.85
GTEST_TESTFunction · 0.85
getIdentsMembershipMethod · 0.85

Calls 6

getSubcolumnsOfNestedFunction · 0.85
splitNameFunction · 0.70
emptyMethod · 0.45
containsMethod · 0.45
push_backMethod · 0.45
emplace_backMethod · 0.45

Tested by 1

GTEST_TESTFunction · 0.68