github-actions[bot] commented on code in PR #63652:
URL: https://github.com/apache/doris/pull/63652#discussion_r3301096887
##########
be/src/storage/iterator/vertical_block_reader.cpp:
##########
@@ -520,12 +517,11 @@ Status VerticalBlockReader::_unique_key_next_block(Block*
block, bool* eof) {
const auto column_to_keep = target_columns.size();
target_columns_guard.restore();
- _delete_filter_column = std::move(delete_filter_column);
- ColumnWithTypeAndName column_with_type_and_name
{_delete_filter_column,
-
std::make_shared<DataTypeUInt8>(),
-
"__DORIS_COMPACTION_FILTER__"};
- block->insert(column_with_type_and_name);
- RETURN_IF_ERROR(Block::filter_block(block, column_to_keep,
column_to_keep));
+ block->insert({std::move(_delete_filter_column),
std::make_shared<DataTypeUInt8>(),
+ "__DORIS_COMPACTION_FILTER__"});
+ auto filter_status = Block::filter_block(block, column_to_keep,
column_to_keep);
+ _delete_filter_column = ColumnUInt8::create();
Review Comment:
This recreates the filter column after every block, so vertical compaction
now allocates a fresh `ColumnUInt8` buffer for each batch. The old code kept
`_delete_filter_column` alive after `filter_block()` erased the temporary block
column, so subsequent batches could reuse the existing capacity via
`resize(block_rows)`. This path runs once per block during unique-key vertical
compaction, and the new per-batch allocation is avoidable. Please keep the
concrete type but preserve buffer reuse, for example by inserting an immutable
reference to the existing column for filtering and retaining
`_delete_filter_column` after `filter_block()` removes the temporary column.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]