1#pragma once
2
3#include <Core/Block.h>
4#include <Core/NamesAndTypes.h>
5
6
7namespace DB
8{
9
10namespace Nested
11{
12 std::string concatenateName(const std::string & nested_table_name, const std::string & nested_field_name);
13
14 std::pair<std::string, std::string> splitName(const std::string & name);
15
16 /// Returns the prefix of the name to the first '.'. Or the name is unchanged if there is no dot.
17 std::string extractTableName(const std::string & nested_name);
18
19 /// Replace Array(Tuple(...)) columns to a multiple of Array columns in a form of `column_name.element_name`.
20 Block flatten(const Block & block);
21
22 /// Collect Array columns in a form of `column_name.element_name` to single Array(Tuple(...)) column.
23 NamesAndTypesList collect(const NamesAndTypesList & names_and_types);
24
25 /// Check that sizes of arrays - elements of nested data structures - are equal.
26 void validateArraySizes(const Block & block);
27}
28
29}
30