aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Parsers/ASTInterpolateElement.h
blob: a278755de887c9cd7d90c8df31b1beb117a8444f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

#include <Parsers/IAST.h>


namespace DB
{

class ASTInterpolateElement : public IAST
{
public:
    String column;
    ASTPtr expr;

    String getID(char delim) const override { return String("InterpolateElement") + delim + "(column " + column + ")"; }

    ASTPtr clone() const override
    {
        auto clone = std::make_shared<ASTInterpolateElement>(*this);
        clone->expr = clone->expr->clone();
        clone->children.clear();
        clone->children.push_back(clone->expr);
        return clone;
    }


protected:
    void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
};

}