Update AlterCommands.cpp

This commit is contained in:
alexey-milovidov 2020-03-22 03:56:10 +03:00 committed by GitHub
parent 46829a63f3
commit 03aa8d4cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,11 +188,8 @@ std::optional<AlterCommand> AlterCommand::parse(const ASTAlterCommand * command_
return command;
}
else if (command_ast->type == ASTAlterCommand::DROP_CONSTRAINT && !command_ast->partition)
else if (command_ast->type == ASTAlterCommand::DROP_CONSTRAINT)
{
if (command_ast->clear_column)
throw Exception(R"("ALTER TABLE table DROP CONSTRAINT constraint_name" queries are not supported yet. Use "DROP CONSTRAINT constraint_name IN PARTITION".)", ErrorCodes::NOT_IMPLEMENTED);
AlterCommand command;
command.ast = command_ast->clone();
command.if_exists = command_ast->if_exists;