Fix error

This commit is contained in:
Alexey Milovidov 2024-08-19 05:23:32 +02:00
parent 08b8ca234d
commit ffb45354bd

View File

@ -94,9 +94,10 @@ std::string MarkType::describe() const
std::optional<MarkType> MergeTreeIndexGranularityInfo::getMarksTypeFromFilesystem(const IDataPartStorage & data_part_storage)
{
for (auto it = data_part_storage.iterate(); it->isValid(); it->next())
if (std::string ext = fs::path(it->name()).extension(); MarkType::isMarkFileExtension(ext))
return MarkType(ext);
if (data_part_storage.exists())
for (auto it = data_part_storage.iterate(); it->isValid(); it->next())
if (std::string ext = fs::path(it->name()).extension(); MarkType::isMarkFileExtension(ext))
return MarkType(ext);
return {};
}