mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Changing offset in ReadBuffer to size_t
This commit is contained in:
parent
5e2b2b1eee
commit
fa2261dee6
@ -40,7 +40,7 @@ bool ReadBufferFromBlobStorage::nextImpl()
|
||||
if (!initialized)
|
||||
initialize();
|
||||
|
||||
if (static_cast<size_t>(offset) >= total_size)
|
||||
if (offset >= total_size)
|
||||
return false;
|
||||
|
||||
size_t to_read_bytes = std::min(total_size - offset, buf_size);
|
||||
@ -100,7 +100,7 @@ void ReadBufferFromBlobStorage::initialize()
|
||||
// TODO: is it the right way?
|
||||
/// try to rewind to offset in the buffer
|
||||
size_t total_read_bytes = 0;
|
||||
while (total_read_bytes < static_cast<size_t>(offset))
|
||||
while (total_read_bytes < offset)
|
||||
{
|
||||
size_t to_read_bytes = std::min(offset - total_read_bytes, buf_size);
|
||||
size_t bytes_read = data_stream->Read(tmp_buffer.data(), to_read_bytes);
|
||||
|
@ -35,7 +35,7 @@ private:
|
||||
std::shared_ptr<Azure::Storage::Blobs::BlobContainerClient> blob_container_client;
|
||||
std::vector<uint8_t> tmp_buffer;
|
||||
const String path;
|
||||
off_t offset = 0;
|
||||
size_t offset = 0;
|
||||
size_t buf_size;
|
||||
size_t total_size;
|
||||
bool initialized = false;
|
||||
|
Loading…
Reference in New Issue
Block a user