mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
26 lines
744 B
C++
26 lines
744 B
C++
#pragma once
|
|
|
|
#include <Parsers/IAST.h>
|
|
#include <map>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class ASTSelectWithUnionQuery;
|
|
class ASTSelectQuery;
|
|
class ASTSelectIntersectExceptQuery;
|
|
|
|
/// Pull out the WITH statement from the first child of ASTSelectWithUnion query if any.
|
|
class ApplyWithGlobalVisitor
|
|
{
|
|
public:
|
|
static void visit(ASTPtr & ast);
|
|
|
|
private:
|
|
static void visit(ASTSelectWithUnionQuery & selects, const std::map<String, ASTPtr> & exprs, const ASTPtr & with_expression_list);
|
|
static void visit(ASTSelectQuery & select, const std::map<String, ASTPtr> & exprs, const ASTPtr & with_expression_list);
|
|
static void visit(ASTSelectIntersectExceptQuery & select, const std::map<String, ASTPtr> & exprs, const ASTPtr & with_expression_list);
|
|
};
|
|
|
|
}
|