1 | #pragma once |
2 | |
3 | #include <Parsers/IAST.h> |
4 | #include <common/StringRef.h> |
5 | |
6 | |
7 | namespace DB |
8 | { |
9 | |
10 | /// Either a (possibly compound) expression representing a partition value or a partition ID. |
11 | class ASTPartition : public IAST |
12 | { |
13 | public: |
14 | ASTPtr value; |
15 | String fields_str; /// The extent of comma-separated partition expression fields without parentheses. |
16 | size_t fields_count = 0; |
17 | |
18 | String id; |
19 | |
20 | String getID(char) const override; |
21 | ASTPtr clone() const override; |
22 | |
23 | protected: |
24 | void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override; |
25 | }; |
26 | |
27 | } |
28 | |