Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
  • Loading branch information
Lloyd-Pottiger committed Dec 20, 2024
1 parent 9816376 commit 370657d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dbms/src/Storages/DeltaMerge/File/DMFileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ Block DMFileReader::readWithFilter(const IColumn::Filter & filter)

/// 1. Get start_pack_id, rs_result, read_rows, and new read block infos

const auto & original_block_info = read_block_infos.front();
const auto [start_pack_id, pack_count, rs_result, read_rows] = original_block_info;
const auto [start_pack_id, pack_count, rs_result, read_rows] = read_block_infos.front();
read_block_infos.pop_front();
// do not update next_pack_id here, it will be updated in readImpl().
// next_pack_id = start_pack_id + pack_count;
RUNTIME_CHECK(read_rows == filter.size(), read_rows, filter.size());
const auto new_block_infos = getNewReadBlockInfos(start_pack_id, start_pack_id + pack_count, filter);
const size_t start_row_offset = pack_offset[start_pack_id];
Expand Down Expand Up @@ -752,11 +754,7 @@ std::vector<DMFileReader::ReadBlockInfo> DMFileReader::getNewReadBlockInfos(
size_t pack_end,
const IColumn::Filter & filter)
{
read_block_infos.pop_front();
// do not update next_pack_id here, it will be updated in read().
// next_pack_id = start_pack_id + pack_count;
const size_t start_row_offset = pack_offset[pack_begin];

const auto & pack_res = pack_filter.getPackResConst();
const auto & pack_stats = dmfile->getPackStats();
std::vector<ReadBlockInfo> new_read_block_infos;
Expand Down

0 comments on commit 370657d

Please sign in to comment.