mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-01 06:00:49 +00:00
25 lines
684 B
C++
25 lines
684 B
C++
|
#include <Parsers/ParserSelectQuery.h>
|
||
|
#include <Parsers/ExpressionListParsers.h>
|
||
|
#include <Parsers/ParserSelectWithUnionQuery.h>
|
||
|
#include <Parsers/ASTSelectWithUnionQuery.h>
|
||
|
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
bool ParserSelectWithUnionQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parsed_pos, Expected & expected)
|
||
|
{
|
||
|
ASTPtr list_node;
|
||
|
|
||
|
ParserList parser(std::make_unique<ParserSelectQuery>(), std::make_unique<ParserKeyword>("UNION ALL"), false);
|
||
|
if (!parser.parse(pos, end, list_node, max_parsed_pos, expected))
|
||
|
return false;
|
||
|
|
||
|
node = std::make_shared<ASTSelectWithUnionQuery>(list_node->range);
|
||
|
node->children = list_node->children;
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
}
|