From 6ee919120335492d2fc973559ff2a5ddb8e42044 Mon Sep 17 00:00:00 2001 From: zhongyuankai <872237106@qq.com> Date: Thu, 11 Aug 2022 08:19:08 +0800 Subject: [PATCH] fix build --- src/Storages/MergeTree/IPartMetadataManager.cpp | 8 ++------ src/Storages/MergeTree/IPartMetadataManager.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Storages/MergeTree/IPartMetadataManager.cpp b/src/Storages/MergeTree/IPartMetadataManager.cpp index 448dd7433a4..956083323b9 100644 --- a/src/Storages/MergeTree/IPartMetadataManager.cpp +++ b/src/Storages/MergeTree/IPartMetadataManager.cpp @@ -9,13 +9,9 @@ IPartMetadataManager::IPartMetadataManager(const IMergeTreeDataPart * part_) : p { } -bool IPartMetadataManager::isCompressFromFileName(const String & file_name) const +bool IPartMetadataManager::isCompressFromFileName(const String & file_name) { const auto & extension = fs::path(file_name).extension(); - if (isCompressFromMrkExtension(extension) - || isCompressFromIndexExtension(extension)) - return true; - - return false; + return isCompressFromMrkExtension(extension) || isCompressFromIndexExtension(extension); } } diff --git a/src/Storages/MergeTree/IPartMetadataManager.h b/src/Storages/MergeTree/IPartMetadataManager.h index 265637008ce..9ff6d81d5ae 100644 --- a/src/Storages/MergeTree/IPartMetadataManager.h +++ b/src/Storages/MergeTree/IPartMetadataManager.h @@ -52,7 +52,7 @@ public: virtual std::unordered_map check() const = 0; /// Determine whether to compress by file extension - bool isCompressFromFileName(const String & file_name) const; + static bool isCompressFromFileName(const String & file_name); protected: const IMergeTreeDataPart * part;