Update CachedReadBufferFromRemoteFS.cpp

This commit is contained in:
Kseniia Sumarokova 2022-04-29 19:13:35 +02:00 committed by GitHub
parent 5807ca47b0
commit 7191d3d75b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -768,7 +768,7 @@ bool CachedReadBufferFromRemoteFS::nextImplStep()
if (size == 0 && file_offset_of_buffer_end < read_until_position)
{
std::optional<size_t> cache_file_size;
if (auto * cache_file_reader = assert_cast<ReadBufferFromFile *>(implementation_buffer.get()))
if (auto * cache_file_reader = dynamic_cast<ReadBufferFromFile *>(implementation_buffer.get()))
cache_file_size = cache_file_reader->size();
throw Exception(ErrorCodes::LOGICAL_ERROR,