mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
7781fc12ed
521 -> 77 files requiring changes
35 lines
800 B
C++
35 lines
800 B
C++
#pragma once
|
|
|
|
#include <unordered_set>
|
|
|
|
#include <Interpreters/InDepthNodeVisitor.h>
|
|
#include <Parsers/IAST_fwd.h>
|
|
|
|
#include <Core/Settings.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class ASTFunction;
|
|
class ASTSelectWithUnionQuery;
|
|
|
|
class NormalizeSelectWithUnionQueryMatcher
|
|
{
|
|
public:
|
|
struct Data
|
|
{
|
|
const UnionMode & union_default_mode;
|
|
};
|
|
|
|
static void getSelectsFromUnionListNode(ASTPtr ast_select, ASTs & selects);
|
|
|
|
static void visit(ASTPtr & ast, Data &);
|
|
static void visit(ASTSelectWithUnionQuery &, Data &);
|
|
static bool needChildVisit(const ASTPtr &, const ASTPtr &) { return true; }
|
|
};
|
|
|
|
/// We need normalize children first, so we should visit AST tree bottom up
|
|
using NormalizeSelectWithUnionQueryVisitor
|
|
= InDepthNodeVisitor<NormalizeSelectWithUnionQueryMatcher, false>;
|
|
}
|