aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Interpreters/MarkTableIdentifiersVisitor.h
blob: d05c067397b95fc9482d360112609ce32449a7e4 (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
32
#pragma once

#include <Parsers/IAST.h>
#include <Interpreters/Aliases.h>
#include <Interpreters/InDepthNodeVisitor.h>

namespace DB
{

class ASTFunction;
struct ASTTableExpression;

class MarkTableIdentifiersMatcher
{
public:
    using Visitor = InDepthNodeVisitor<MarkTableIdentifiersMatcher, true>;

    struct Data
    {
        const Aliases & aliases;
    };

    static bool needChildVisit(ASTPtr & node, const ASTPtr & child);
    static void visit(ASTPtr & ast, Data & data);

private:
    static void visit(ASTFunction & func, const Data & data);
};

using MarkTableIdentifiersVisitor = MarkTableIdentifiersMatcher::Visitor;

}