mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
36 lines
835 B
C++
36 lines
835 B
C++
#pragma once
|
|
|
|
#include <map>
|
|
|
|
#include <Parsers/IAST.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
class ASTFunction;
|
|
class ASTSelectQuery;
|
|
class ASTSelectWithUnionQuery;
|
|
struct ASTTableExpression;
|
|
|
|
class ApplyWithSubqueryVisitor
|
|
{
|
|
public:
|
|
struct Data
|
|
{
|
|
std::map<String, ASTPtr> subqueries;
|
|
};
|
|
|
|
static void visit(ASTPtr & ast) { visit(ast, {}); }
|
|
static void visit(ASTSelectQuery & select) { visit(select, {}); }
|
|
static void visit(ASTSelectWithUnionQuery & select) { visit(select, {}); }
|
|
|
|
private:
|
|
static void visit(ASTPtr & ast, const Data & data);
|
|
static void visit(ASTSelectQuery & ast, const Data & data);
|
|
static void visit(ASTSelectWithUnionQuery & ast, const Data & data);
|
|
static void visit(ASTTableExpression & table, const Data & data);
|
|
static void visit(ASTFunction & func, const Data & data);
|
|
};
|
|
|
|
}
|