2022-01-05 11:51:50 +00:00
|
|
|
#include "IPartMetadataManager.h"
|
|
|
|
|
|
|
|
#include <Disks/IVolume.h>
|
|
|
|
#include <Storages/MergeTree/IMergeTreeDataPart.h>
|
|
|
|
|
2022-08-28 02:19:14 +00:00
|
|
|
|
2022-01-05 11:51:50 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
2022-08-28 02:19:14 +00:00
|
|
|
|
2022-04-22 16:58:09 +00:00
|
|
|
IPartMetadataManager::IPartMetadataManager(const IMergeTreeDataPart * part_) : part(part_)
|
2022-01-05 11:51:50 +00:00
|
|
|
{
|
|
|
|
}
|
2022-05-29 07:28:02 +00:00
|
|
|
|
2022-08-28 02:19:14 +00:00
|
|
|
bool IPartMetadataManager::isCompressedFromFileName(const String & file_name)
|
2022-05-29 07:28:02 +00:00
|
|
|
{
|
2022-09-05 04:31:19 +00:00
|
|
|
std::string extension = fs::path(file_name).extension();
|
2022-09-05 05:31:29 +00:00
|
|
|
return (MarkType::isMarkFileExtension(extension) && MarkType(extension).compressed)
|
|
|
|
|| isCompressedFromIndexExtension(extension);
|
2022-05-29 07:28:02 +00:00
|
|
|
}
|
2022-08-28 02:19:14 +00:00
|
|
|
|
2022-01-05 11:51:50 +00:00
|
|
|
}
|