Skip to content

Avoid code duplication in alterPartition#16875

Merged
alesapin merged 3 commits intoClickHouse:masterfrom
CurtizJ:refactor-alter-partition
Nov 12, 2020
Merged

Avoid code duplication in alterPartition#16875
alesapin merged 3 commits intoClickHouse:masterfrom
CurtizJ:refactor-alter-partition

Conversation

@CurtizJ
Copy link
Copy Markdown
Member

@CurtizJ CurtizJ commented Nov 11, 2020

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Method alterPartition was almost byte-to-byte identical in StorageMergeTree and StorageReplicatedMergeTree:

1c1
< Pipe StorageReplicatedMergeTree::alterPartition(
---
> Pipe StorageMergeTree::alterPartition(
25c25
<                 current_command_results = attachPartition(command.partition, metadata_snapshot, command.part, query_context);
---
>                 current_command_results = attachPartition(command.partition, command.part, query_context);
26a27
> 
45a47
> 
58,61d59
<             case PartitionCommand::FETCH_PARTITION:
<                 fetchPartition(command.partition, metadata_snapshot, command.from_zookeeper_path, query_context);
<                 break;
< 
74a73,75
> 
>             default:
>                 IStorage::alterPartition(metadata_snapshot, commands, query_context); // should throw an exception.
75a77
> 

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Nov 11, 2020
@alesapin alesapin self-assigned this Nov 11, 2020
@alesapin
Copy link
Copy Markdown
Member

00804_test_delta_codec_compression -- flaky test?

@alesapin alesapin merged commit 2cac5e5 into ClickHouse:master Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants