mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Make check more specific
This commit is contained in:
parent
0d463b839e
commit
f76e6ecdaf
@ -22,6 +22,7 @@ namespace ErrorCodes
|
|||||||
{
|
{
|
||||||
extern const int UNKNOWN_MUTATION_COMMAND;
|
extern const int UNKNOWN_MUTATION_COMMAND;
|
||||||
extern const int MULTIPLE_ASSIGNMENTS_TO_COLUMN;
|
extern const int MULTIPLE_ASSIGNMENTS_TO_COLUMN;
|
||||||
|
extern const int LOGICAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -115,10 +116,10 @@ std::optional<MutationCommand> MutationCommand::parse(ASTAlterCommand * command,
|
|||||||
res.column_name = getIdentifierName(command->column);
|
res.column_name = getIdentifierName(command->column);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
/// MODIFY COLUMN x REMOVE MATERIALIZED is a valid alter command, but doesn't have any specified column type, thus no mutation is needed
|
/// MODIFY COLUMN x REMOVE MATERIALIZED/RESET SETTING/MODIFY SETTING is a valid alter command, but doesn't have any specified column type,
|
||||||
|
/// thus no mutation is needed
|
||||||
else if (
|
else if (
|
||||||
parse_alter_commands && command->type == ASTAlterCommand::MODIFY_COLUMN && command->col_decl
|
parse_alter_commands && command->type == ASTAlterCommand::MODIFY_COLUMN && command->remove_property.empty() && nullptr == command->settings_changes && nullptr == command->settings_resets)
|
||||||
&& command->col_decl->as<ASTColumnDeclaration &>().type)
|
|
||||||
{
|
{
|
||||||
MutationCommand res;
|
MutationCommand res;
|
||||||
res.ast = command->ptr();
|
res.ast = command->ptr();
|
||||||
|
Loading…
Reference in New Issue
Block a user