1 | #pragma once |
---|---|
2 | |
3 | #include <Interpreters/Aliases.h> |
4 | |
5 | namespace DB |
6 | { |
7 | |
8 | /// It removes Function_if node from AST if condition is constant. |
9 | /// TODO: rewrite with InDepthNodeVisitor |
10 | class OptimizeIfWithConstantConditionVisitor |
11 | { |
12 | public: |
13 | OptimizeIfWithConstantConditionVisitor(Aliases & aliases_) |
14 | : aliases(aliases_) |
15 | {} |
16 | |
17 | void visit(ASTPtr & ast); |
18 | |
19 | private: |
20 | Aliases & aliases; |
21 | }; |
22 | |
23 | } |
24 |