mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
23 lines
559 B
C++
23 lines
559 B
C++
#include <Parsers/ASTSubquery.h>
|
|
#include <Parsers/ExpressionElementParsers.h>
|
|
#include <Parsers/ParserSelectQuery.h>
|
|
#include <Parsers/ParserUnionQueryElement.h>
|
|
#include <Common/typeid_cast.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
bool ParserUnionQueryElement::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
|
{
|
|
if (!ParserSubquery().parse(pos, node, expected) && !ParserSelectQuery().parse(pos, node, expected))
|
|
return false;
|
|
|
|
if (const auto * ast_subquery = node->as<ASTSubquery>())
|
|
node = ast_subquery->children.at(0);
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|