mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Forgot about 'WITH NAME …' statement part.
This commit is contained in:
parent
935615a647
commit
126ff55fa7
@ -130,7 +130,13 @@ void ASTAlterCommand::formatImpl(
|
|||||||
}
|
}
|
||||||
else if (type == ASTAlterCommand::FREEZE_ALL)
|
else if (type == ASTAlterCommand::FREEZE_ALL)
|
||||||
{
|
{
|
||||||
// TODO: implement this.
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << indent_str << "FREEZE";
|
||||||
|
|
||||||
|
if (!with_name.empty())
|
||||||
|
{
|
||||||
|
settings.ostr << " " << (settings.hilite ? hilite_keyword : "") << "WITH NAME" << (settings.hilite ? hilite_none : "")
|
||||||
|
<< " " << std::quoted(with_name, '\'');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (type == ASTAlterCommand::DELETE)
|
else if (type == ASTAlterCommand::DELETE)
|
||||||
{
|
{
|
||||||
|
@ -183,6 +183,19 @@ bool ParserAlterCommand::parseImpl(Pos & pos, ASTPtr & node, Expected & expected
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/// WITH NAME 'name' - place local backup to directory with specified name
|
||||||
|
if (s_with.ignore(pos, expected))
|
||||||
|
{
|
||||||
|
if (!s_name.ignore(pos, expected))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
ASTPtr ast_with_name;
|
||||||
|
if (!parser_string_literal.parse(pos, ast_with_name, expected))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
command->with_name = typeid_cast<const ASTLiteral &>(*ast_with_name).value.get<const String &>();
|
||||||
|
}
|
||||||
|
|
||||||
command->type = ASTAlterCommand::FREEZE_ALL;
|
command->type = ASTAlterCommand::FREEZE_ALL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace DB
|
|||||||
* [MODIFY PRIMARY KEY (a, b, c...)]
|
* [MODIFY PRIMARY KEY (a, b, c...)]
|
||||||
* [DROP|DETACH|ATTACH PARTITION|PART partition, ...]
|
* [DROP|DETACH|ATTACH PARTITION|PART partition, ...]
|
||||||
* [FETCH PARTITION partition FROM ...]
|
* [FETCH PARTITION partition FROM ...]
|
||||||
* [FREEZE [PARTITION]]
|
* [FREEZE [PARTITION] [WITH NAME name]]
|
||||||
* [DELETE WHERE ...]
|
* [DELETE WHERE ...]
|
||||||
* [UPDATE col_name = expr, ... WHERE ...]
|
* [UPDATE col_name = expr, ... WHERE ...]
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user