From 16f697f61d0bc7503133a239f8f3c1fa84581221 Mon Sep 17 00:00:00 2001 From: zhongyuankai <872237106@qq.com> Date: Tue, 15 Nov 2022 08:47:51 +0800 Subject: [PATCH] fix test --- src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp b/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp index bbd61a59b93..eb5df92b30e 100644 --- a/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp +++ b/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp @@ -638,7 +638,8 @@ size_t MergeTreeDataMergerMutator::estimateNeededDiskSpace(const MergeTreeData:: for (const MergeTreeData::DataPartPtr & part : source_parts) { /// Exclude expired parts - if (part->ttl_infos.part_max_ttl <= current_time) + time_t part_max_ttl = part->ttl_infos.part_max_ttl; + if (part_max_ttl && part_max_ttl <= current_time) continue; res += part->getBytesOnDisk();