mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge pull request #5613 from sundy-li/improve/distribute-alter-more
make isSupportedAlterType better
This commit is contained in:
commit
eb1fe2ed17
@ -200,21 +200,16 @@ static std::unique_ptr<zkutil::Lock> createSimpleZooKeeperLock(
|
||||
|
||||
static bool isSupportedAlterType(int type)
|
||||
{
|
||||
static const std::unordered_set<int> supported_alter_types{
|
||||
ASTAlterCommand::ADD_COLUMN,
|
||||
ASTAlterCommand::DROP_COLUMN,
|
||||
ASTAlterCommand::MODIFY_COLUMN,
|
||||
ASTAlterCommand::DROP_PARTITION,
|
||||
ASTAlterCommand::DELETE,
|
||||
ASTAlterCommand::UPDATE,
|
||||
ASTAlterCommand::COMMENT_COLUMN,
|
||||
ASTAlterCommand::MODIFY_ORDER_BY,
|
||||
ASTAlterCommand::MODIFY_TTL,
|
||||
ASTAlterCommand::ADD_INDEX,
|
||||
ASTAlterCommand::DROP_INDEX,
|
||||
static const std::unordered_set<int> unsupported_alter_types{
|
||||
ASTAlterCommand::ATTACH_PARTITION,
|
||||
ASTAlterCommand::REPLACE_PARTITION,
|
||||
ASTAlterCommand::FETCH_PARTITION,
|
||||
ASTAlterCommand::FREEZE_PARTITION,
|
||||
ASTAlterCommand::FREEZE_ALL,
|
||||
ASTAlterCommand::NO_TYPE,
|
||||
};
|
||||
|
||||
return supported_alter_types.count(type) != 0;
|
||||
return unsupported_alter_types.count(type) == 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user