[fix](compaction) filter block row locations with delete sign should ignore merge on read scenario (#22628)

This commit is contained in:
huanghaibin
2023-08-05 09:15:38 +08:00
committed by GitHub
parent ef0e0b7d79
commit 12262a2025

View File

@ -465,8 +465,10 @@ Status VerticalBlockReader::_unique_key_next_block(Block* block, bool* eof) {
filter_data[cur_row] = sign;
if (UNLIKELY(!sign)) {
_row_sources_buffer->set_agg_flag(row_source_idx, true);
_block_row_locations[cur_row].row_id = -1;
delete_count++;
if (UNLIKELY(_reader_context.record_rowids)) {
_block_row_locations[cur_row].row_id = -1;
delete_count++;
}
}
cur_row++;
row_source_idx++;
@ -483,7 +485,9 @@ Status VerticalBlockReader::_unique_key_next_block(Block* block, bool* eof) {
Block::filter_block(block, target_columns.size(), target_columns.size()));
_stats.rows_del_filtered += block_rows - block->rows();
DCHECK(block->try_get_by_name("__DORIS_COMPACTION_FILTER__") == nullptr);
DCHECK_EQ(_block_row_locations.size(), block->rows() + delete_count);
if (UNLIKELY(_reader_context.record_rowids)) {
DCHECK_EQ(_block_row_locations.size(), block->rows() + delete_count);
}
}
size_t filtered_rows_in_rs_buffer = 0;