Fix bad code in the system.filesystem_cache

This commit is contained in:
Alexey Milovidov 2023-09-04 03:53:18 +02:00
parent 43376f0037
commit e618dc993e

View File

@ -1,7 +1,6 @@
#include "StorageSystemFilesystemCache.h"
#include <DataTypes/DataTypeString.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeTuple.h>
#include <DataTypes/DataTypeNullable.h>
#include <Interpreters/Cache/FileCache.h>
#include <Interpreters/Cache/FileSegment.h>
@ -68,18 +67,13 @@ void StorageSystemFilesystemCache::fillData(MutableColumns & res_columns, Contex
res_columns[i++]->insert(file_segment->getDownloadedSize());
res_columns[i++]->insert(toString(file_segment->getKind()));
res_columns[i++]->insert(file_segment->isUnbound());
try
{
if (fs::exists(path))
std::error_code ignored;
if (fs::exists(path, ignored))
res_columns[i++]->insert(fs::file_size(path));
else
res_columns[i++]->insertDefault();
}
catch (...)
{
res_columns[i++]->insertDefault();
}
}
}
}