Minor change

This commit is contained in:
Pavel Kruglov 2020-11-11 00:02:11 +03:00
parent 1c35b47073
commit dd06ff4f94
3 changed files with 9 additions and 9 deletions

View File

@ -656,7 +656,7 @@ std::shared_ptr<StorageMergeTree::MergeMutateSelectedEntry> StorageMergeTree::se
&& getCurrentMutationVersion(left, lock) == getCurrentMutationVersion(right, lock);
};
SelectPartsDecision select_decision = SelectPartsDecision::NOTHING_TO_MERGE;
SelectPartsDecision select_decision;
if (partition_id.empty())
{

View File

@ -3844,7 +3844,7 @@ bool StorageReplicatedMergeTree::optimize(
FutureMergedMutatedPart future_merged_part;
String disable_reason;
SelectPartsDecision select_decision = SelectPartsDecision::NOTHING_TO_MERGE;
SelectPartsDecision select_decision;
if (!partition)
{

View File

@ -2,13 +2,13 @@ DROP TABLE IF EXISTS optimize_final;
CREATE TABLE optimize_final(t DateTime, x Int32) ENGINE = MergeTree() PARTITION BY toYYYYMM(t) ORDER BY x SETTINGS optimize_skip_merged_partitions=1;
INSERT INTO optimize_final SELECT toDate('2000-01-01'), number FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2000-01-01'), number + 5 FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2020-01-01'), number FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2020-01-01'), number + 5 FROM numbers(5);
OPTIMIZE TABLE optimize_final FINAL;
INSERT INTO optimize_final SELECT toDate('2020-01-01'), number FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2020-01-01'), number + 5 FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2000-01-01'), number FROM numbers(5);
INSERT INTO optimize_final SELECT toDate('2000-01-01'), number + 5 FROM numbers(5);
OPTIMIZE TABLE optimize_final FINAL;