mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
remove trash from MOVE PARTITION command
This commit is contained in:
parent
8265db80ff
commit
304b9f1a93
@ -403,12 +403,6 @@ bool ParserAlterCommand::parseImpl(Pos & pos, ASTPtr & node, Expected & expected
|
||||
command->move_destination_type = DataDestinationType::DISK;
|
||||
else if (s_to_volume.ignore(pos))
|
||||
command->move_destination_type = DataDestinationType::VOLUME;
|
||||
else if (s_to_table.ignore(pos))
|
||||
{
|
||||
if (!parseDatabaseAndTableName(pos, expected, command->to_database, command->to_table))
|
||||
return false;
|
||||
command->move_destination_type = DataDestinationType::TABLE;
|
||||
}
|
||||
else if (s_to_shard.ignore(pos))
|
||||
{
|
||||
command->move_destination_type = DataDestinationType::SHARD;
|
||||
@ -416,14 +410,11 @@ bool ParserAlterCommand::parseImpl(Pos & pos, ASTPtr & node, Expected & expected
|
||||
else
|
||||
return false;
|
||||
|
||||
if (command->move_destination_type != DataDestinationType::TABLE)
|
||||
{
|
||||
ASTPtr ast_space_name;
|
||||
if (!parser_string_literal.parse(pos, ast_space_name, expected))
|
||||
return false;
|
||||
ASTPtr ast_space_name;
|
||||
if (!parser_string_literal.parse(pos, ast_space_name, expected))
|
||||
return false;
|
||||
|
||||
command->move_destination_name = ast_space_name->as<ASTLiteral &>().value.get<const String &>();
|
||||
}
|
||||
command->move_destination_name = ast_space_name->as<ASTLiteral &>().value.get<const String &>();
|
||||
}
|
||||
else if (s_move_partition.ignore(pos, expected))
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ SELECT count() FROM test_move_partition_src;
|
||||
SELECT count() FROM test_move_partition_dest;
|
||||
|
||||
ALTER TABLE test_move_partition_src MOVE PARTITION 1 TO TABLE test_move_partition_dest;
|
||||
ALTER TABLE test_move_partition_src MOVE PART '0_1_1_0' TO TABLE test_move_partition_dest; -- { clientError SYNTAX_ERROR }
|
||||
|
||||
SELECT count() FROM test_move_partition_src;
|
||||
SELECT count() FROM test_move_partition_dest;
|
||||
|
Loading…
Reference in New Issue
Block a user