| 342 | } |
| 343 | |
| 344 | Block 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 | |
| 364 | void flattenTupleLeafNames(const String & name, const DataTypePtr & type, Names & out) |
| 365 | { |
no test coverage detected