Merge pull request #34786 from ClickHouse/make_drop_column_metadata_only

Make drop of alias column metadata only
This commit is contained in:
Mikhail f. Shiryaev 2022-02-21 14:11:55 +01:00 committed by GitHub
commit 5ac8cdbc69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -763,9 +763,13 @@ bool AlterCommand::isRequireMutationStage(const StorageInMemoryMetadata & metada
if (isRemovingProperty() || type == REMOVE_TTL || type == REMOVE_SAMPLE_BY)
return false;
if (type == DROP_COLUMN || type == DROP_INDEX || type == DROP_PROJECTION || type == RENAME_COLUMN)
if (type == DROP_INDEX || type == DROP_PROJECTION || type == RENAME_COLUMN)
return true;
/// Drop alias is metadata alter, in other case mutation is required.
if (type == DROP_COLUMN)
return metadata.columns.hasPhysical(column_name);
if (type != MODIFY_COLUMN || data_type == nullptr)
return false;