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>
|
2022-08-30 10:09:01 +00:00
|
|
|
#include <Core/SettingsEnums.h>
|
2021-08-12 11:42:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ASTFunction;
|
2021-11-26 18:27:16 +00:00
|
|
|
class ASTSelectWithUnionQuery;
|
2021-08-12 11:42:51 +00:00
|
|
|
|
|
|
|
class SelectIntersectExceptQueryMatcher
|
|
|
|
{
|
|
|
|
public:
|
2022-08-30 10:09:01 +00:00
|
|
|
struct Data
|
|
|
|
{
|
|
|
|
const SetOperationMode intersect_default_mode;
|
|
|
|
const SetOperationMode except_default_mode;
|
|
|
|
};
|
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>;
|
|
|
|
}
|