ClickHouse/src/Parsers/ParserCase.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
524 B
C++
Raw Normal View History

2016-05-03 23:19:14 +00:00
#pragma once
#include <Parsers/IParserBase.h>
2016-05-03 23:19:14 +00:00
namespace DB
{
/** CASE construction
* Two variants:
* 1. CASE expr WHEN val1 THEN res1 [WHEN ...] ELSE resN END
* 2. CASE WHEN cond1 THEN res1 [WHEN ...] ELSE resN END
* NOTE Until we get full support for NULL values in ClickHouse, ELSE sections are mandatory.
*/
class ParserCase final : public IParserBase
{
protected:
const char * getName() const override { return "case"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
2016-05-03 23:19:14 +00:00
};
}