mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
22 lines
562 B
C++
22 lines
562 B
C++
|
#pragma once
|
||
|
|
||
|
#include <DB/Parsers/ParserQueryWithOutput.h>
|
||
|
|
||
|
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, Pos end, ASTPtr & node, Pos & max_parsed_pos, Expected & expected) override;
|
||
|
};
|
||
|
|
||
|
}
|