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

Function flattenTupleRecursive

src/DataTypes/NestedUtils.cpp:344–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344Block flattenTupleRecursive(const Block & block, std::vector<Strings> * flattened_ancestors)
345{
346 Block result;
347 if (flattened_ancestors)
348 flattened_ancestors->clear();
349 for (const auto & elem : block)
350 {
351 flattenTupleRecursiveImpl(
352 elem.column, elem.type,
353 [&](const ColumnPtr & col, const DataTypePtr & type, const String & name, const Strings & ancestors)
354 {
355 result.insert(ColumnWithTypeAndName(col, type, name));
356 if (flattened_ancestors)
357 flattened_ancestors->push_back(ancestors);
358 },
359 elem.name, {});
360 }
361 return result;
362}
363
364void flattenTupleLeafNames(const String & name, const DataTypePtr & type, Names & out)
365{

Callers 4

defineColumnsFunction · 0.85
initializeMethod · 0.85
defineColumnsFunction · 0.85
initializeMethod · 0.85

Calls 5

clearMethod · 0.45
insertMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected