diff --git a/internal/core/src/segcore/SegmentChunkReader.cpp b/internal/core/src/segcore/SegmentChunkReader.cpp index 1dd6fb826804f..207248acf888e 100644 --- a/internal/core/src/segcore/SegmentChunkReader.cpp +++ b/internal/core/src/segcore/SegmentChunkReader.cpp @@ -125,9 +125,6 @@ SegmentChunkReader::GetChunkDataAccessor( auto chunk_info = segment_->chunk_view(field_id, current_chunk_id); - auto chunk_data = chunk_info.first.data(); - auto chunk_valid_data = chunk_info.second; - auto current_chunk_size = segment_->chunk_size(field_id, current_chunk_id); return [=, @@ -136,13 +133,13 @@ SegmentChunkReader::GetChunkDataAccessor( if (current_chunk_pos >= current_chunk_size) { current_chunk_id++; current_chunk_pos = 0; - auto chunk_info = segment_->chunk_view( + chunk_info = segment_->chunk_view( field_id, current_chunk_id); - chunk_data = chunk_info.first.data(); - chunk_valid_data = chunk_info.second; current_chunk_size = segment_->chunk_size(field_id, current_chunk_id); } + auto chunk_data = chunk_info.first; + auto chunk_valid_data = chunk_info.second; if (current_chunk_pos < chunk_valid_data.size() && !chunk_valid_data[current_chunk_pos]) { current_chunk_pos++;