mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
24 lines
406 B
C++
24 lines
406 B
C++
#pragma once
|
|
|
|
#include <Interpreters/Aliases.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// It removes Function_if node from AST if condition is constant.
|
|
/// TODO: rewrite with InDepthNodeVisitor
|
|
class OptimizeIfWithConstantConditionVisitor
|
|
{
|
|
public:
|
|
explicit OptimizeIfWithConstantConditionVisitor(Aliases & aliases_)
|
|
: aliases(aliases_)
|
|
{}
|
|
|
|
void visit(ASTPtr & ast);
|
|
|
|
private:
|
|
Aliases & aliases;
|
|
};
|
|
|
|
}
|