mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Parsing.
This commit is contained in:
parent
441958f590
commit
a6e246b9ba
@ -25,6 +25,11 @@ void ASTInsertQuery::formatImpl(const FormatSettings & settings, FormatState & s
|
||||
{
|
||||
settings.ostr << (settings.hilite ? hilite_keyword : "") << "FUNCTION ";
|
||||
table_function->formatImpl(settings, state, frame);
|
||||
if (partition_by)
|
||||
{
|
||||
settings.ostr << " PARTITION BY ";
|
||||
partition_by->formatImpl(settings, state, frame);
|
||||
}
|
||||
}
|
||||
else
|
||||
settings.ostr << (settings.hilite ? hilite_none : "")
|
||||
|
@ -20,6 +20,7 @@ public:
|
||||
ASTPtr infile;
|
||||
ASTPtr watch;
|
||||
ASTPtr table_function;
|
||||
ASTPtr partition_by;
|
||||
ASTPtr settings_ast;
|
||||
|
||||
/// Data to insert
|
||||
@ -44,6 +45,7 @@ public:
|
||||
if (select) { res->select = select->clone(); res->children.push_back(res->select); }
|
||||
if (watch) { res->watch = watch->clone(); res->children.push_back(res->watch); }
|
||||
if (table_function) { res->table_function = table_function->clone(); res->children.push_back(res->table_function); }
|
||||
if (partition_by) { res->partition_by = partition_by->clone(); res->children.push_back(res->partition_by); }
|
||||
if (settings_ast) { res->settings_ast = settings_ast->clone(); res->children.push_back(res->settings_ast); }
|
||||
|
||||
return res;
|
||||
|
@ -193,6 +193,7 @@ bool ParserInsertQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
||||
if (table_function)
|
||||
{
|
||||
query->table_function = table_function;
|
||||
query->partition_by = partition_by_expr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user