Merge pull request #53214 from azat/tests/vertical-merges-after-drop

Add a regression test for broken Vertical merge after ADD+DROP COLUMN
This commit is contained in:
Alexey Milovidov 2023-09-04 20:47:20 +03:00 committed by GitHub
commit 99ccdfb389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
-- In some versions vertical merges after DROP COLUMN was broken in some cases
drop table if exists data;
create table data (
key Int,
`legacy_features_Map.id` Array(UInt8),
`legacy_features_Map.count` Array(UInt32),
) engine=MergeTree()
order by key
settings
min_bytes_for_wide_part=0,
min_rows_for_wide_part=0,
vertical_merge_algorithm_min_rows_to_activate=0,
vertical_merge_algorithm_min_columns_to_activate=0;
insert into data (key) values (1);
insert into data (key) values (2);
alter table data add column `features_legacy_Map.id` Array(UInt8), add column `features_legacy_Map.count` Array(UInt32);
alter table data drop column legacy_features_Map settings mutations_sync=2;
optimize table data final;
DROP TABLE data;