mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
495c6e03aa
* Replace all Context references with std::weak_ptr * Fix shared context captured by value * Fix build * Fix Context with named sessions * Fix copy context * Fix gcc build * Merge with master and fix build * Fix gcc-9 build
30 lines
697 B
C++
30 lines
697 B
C++
#pragma once
|
|
|
|
#include <Interpreters/Context_fwd.h>
|
|
#include <Interpreters/InDepthNodeVisitor.h>
|
|
#include <Parsers/IAST.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class ASTFunction;
|
|
|
|
/// Removes unneeded injective functions inside `uniq*()`.
|
|
class RemoveInjectiveFunctionsMatcher
|
|
{
|
|
public:
|
|
struct Data : public WithContext
|
|
{
|
|
explicit Data(ContextPtr context_) : WithContext(context_) {}
|
|
};
|
|
|
|
static void visit(ASTPtr & ast, const Data & data);
|
|
static void visit(ASTFunction &, ASTPtr & ast, const Data & data);
|
|
|
|
static bool needChildVisit(const ASTPtr & node, const ASTPtr & child);
|
|
};
|
|
|
|
using RemoveInjectiveFunctionsVisitor = InDepthNodeVisitor<RemoveInjectiveFunctionsMatcher, true>;
|
|
|
|
}
|