2021-08-12 11:42:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <unordered_set>
|
|
|
|
|
|
|
|
#include <Parsers/IAST.h>
|
|
|
|
#include <Interpreters/InDepthNodeVisitor.h>
|
|
|
|
|
|
|
|
#include <Parsers/ASTSelectIntersectExceptQuery.h>
|
|
|
|
#include <Parsers/ASTSelectWithUnionQuery.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ASTFunction;
|
|
|
|
|
|
|
|
class SelectIntersectExceptQueryMatcher
|
|
|
|
{
|
|
|
|
public:
|
2021-08-14 12:31:55 +00:00
|
|
|
struct Data {};
|
2021-08-12 11:42:51 +00:00
|
|
|
|
|
|
|
static bool needChildVisit(const ASTPtr &, const ASTPtr &) { return true; }
|
|
|
|
|
|
|
|
static void visit(ASTPtr & ast, Data &);
|
2021-08-13 09:57:15 +00:00
|
|
|
static void visit(ASTSelectWithUnionQuery &, Data &);
|
2021-08-12 11:42:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/// Visit children first.
|
|
|
|
using SelectIntersectExceptQueryVisitor
|
|
|
|
= InDepthNodeVisitor<SelectIntersectExceptQueryMatcher, false>;
|
|
|
|
}
|