mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Added MATERIALIZE TTL IN PARTITION.
This commit is contained in:
parent
f70d00d28d
commit
8a8142049a
@ -265,6 +265,11 @@ void ASTAlterCommand::formatImpl(
|
|||||||
{
|
{
|
||||||
settings.ostr << (settings.hilite ? hilite_keyword : "") << indent_str << "MATERIALIZE TTL"
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << indent_str << "MATERIALIZE TTL"
|
||||||
<< (settings.hilite ? hilite_none : "");
|
<< (settings.hilite ? hilite_none : "");
|
||||||
|
if (partition)
|
||||||
|
{
|
||||||
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << indent_str<< " IN PARTITION " << (settings.hilite ? hilite_none : "");
|
||||||
|
partition->formatImpl(settings, state, frame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (type == ASTAlterCommand::MODIFY_SETTING)
|
else if (type == ASTAlterCommand::MODIFY_SETTING)
|
||||||
{
|
{
|
||||||
|
@ -462,6 +462,12 @@ bool ParserAlterCommand::parseImpl(Pos & pos, ASTPtr & node, Expected & expected
|
|||||||
else if (s_materialize_ttl.ignore(pos, expected))
|
else if (s_materialize_ttl.ignore(pos, expected))
|
||||||
{
|
{
|
||||||
command->type = ASTAlterCommand::MATERIALIZE_TTL;
|
command->type = ASTAlterCommand::MATERIALIZE_TTL;
|
||||||
|
|
||||||
|
if (s_in_partition.ignore(pos, expected))
|
||||||
|
{
|
||||||
|
if (!parser_partition.parse(pos, command->partition, expected))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (s_modify_setting.ignore(pos, expected))
|
else if (s_modify_setting.ignore(pos, expected))
|
||||||
{
|
{
|
||||||
|
@ -87,6 +87,7 @@ std::optional<MutationCommand> MutationCommand::parse(ASTAlterCommand * command,
|
|||||||
MutationCommand res;
|
MutationCommand res;
|
||||||
res.ast = command->ptr();
|
res.ast = command->ptr();
|
||||||
res.type = MATERIALIZE_TTL;
|
res.type = MATERIALIZE_TTL;
|
||||||
|
res.partition = command->partition;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
|
Loading…
Reference in New Issue
Block a user