Skip to content

Commit

Permalink
fix: frame total size include header for indices (#4754)
Browse files Browse the repository at this point in the history
close #4752
  • Loading branch information
SchrodingerZhu authored Apr 26, 2022
1 parent 5a0b5eb commit 0e1a373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class DMFilePackFilter
dmfile->configuration->getChecksumFrameLength());
index_buf->seek(dmfile->colIndexOffset(file_name_base));
auto header_size = dmfile->configuration->getChecksumHeaderLength();
auto frame_total_size = dmfile->configuration->getChecksumFrameLength();
auto frame_total_size = dmfile->configuration->getChecksumFrameLength() + header_size;
auto frame_count = index_file_size / frame_total_size + (index_file_size % frame_total_size != 0);
return MinMaxIndex::read(*type, *index_buf, index_file_size - header_size * frame_count);
}
Expand Down

0 comments on commit 0e1a373

Please sign in to comment.