diff --git a/src/Storages/ObjectStorage/ReadBufferIterator.cpp b/src/Storages/ObjectStorage/ReadBufferIterator.cpp index 7dd3ad0d79f..7c184f52872 100644 --- a/src/Storages/ObjectStorage/ReadBufferIterator.cpp +++ b/src/Storages/ObjectStorage/ReadBufferIterator.cpp @@ -218,7 +218,6 @@ ReadBufferIterator::Data ReadBufferIterator::next() } const auto filename = current_object_info->getFileName(); - chassert(!filename.empty()); /// file iterator could get new keys after new iteration if (read_keys.size() > prev_read_keys_size) diff --git a/src/Storages/ObjectStorage/StorageObjectStorageSource.cpp b/src/Storages/ObjectStorage/StorageObjectStorageSource.cpp index 105bea87dc4..fd99b832973 100644 --- a/src/Storages/ObjectStorage/StorageObjectStorageSource.cpp +++ b/src/Storages/ObjectStorage/StorageObjectStorageSource.cpp @@ -305,7 +305,7 @@ StorageObjectStorageSource::ReaderHolder StorageObjectStorageSource::createReade { object_info = file_iterator->next(processor); - if (!object_info) + if (!object_info || object_info->getPath().empty()) return {}; if (!object_info->metadata)