ClickHouse/src/Interpreters/OptimizeIfChains.h

20 lines
261 B
C++
Raw Normal View History

2019-12-23 15:08:18 +00:00
#pragma once
2019-12-30 22:24:19 +00:00
#include <Parsers/IAST.h>
2019-12-23 15:08:18 +00:00
namespace DB
{
2019-12-27 18:52:18 +00:00
/// It converts if-chain to multiIf.
class OptimizeIfChainsVisitor
{
public:
2019-12-28 22:08:18 +00:00
OptimizeIfChainsVisitor() = default;
2019-12-27 18:52:18 +00:00
void visit(ASTPtr & ast);
2019-12-23 15:08:18 +00:00
2019-12-30 22:24:19 +00:00
private:
ASTs ifChain(const ASTPtr & child);
2019-12-27 18:52:18 +00:00
};
2019-12-23 15:08:18 +00:00
2019-12-27 18:52:18 +00:00
}