You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/08/31 06:22:33 UTC

[GitHub] [doris] Gabriel39 commented on a diff in pull request #12214: [Improvement](compaction) copy row in batch in VCollectIterator&VGenericIterator

Gabriel39 commented on code in PR #12214:
URL: https://github.com/apache/doris/pull/12214#discussion_r959194685


##########
be/src/vec/olap/vgeneric_iterators.cpp:
##########
@@ -382,21 +399,36 @@ Status VMergeIterator::next_batch(vectorized::Block* block) {
         _block_row_locations.resize(block_row_max);
     }
     size_t row_idx = 0;
+    VMergeIteratorContext* pre_ctx = nullptr;
     while (block->rows() < block_row_max) {
         if (_merge_heap.empty()) break;
 
         auto ctx = _merge_heap.top();
         _merge_heap.pop();
 
         if (!ctx->need_skip()) {

Review Comment:
   Is it possible to have different `need_skip` in a `VMergeIterator `? If all of `ctx` in each `VMergeIterator` is `need_skip` or not `need_skip`, maybe we should move this condition out of this while-loop



##########
be/src/vec/olap/vgeneric_iterators.cpp:
##########
@@ -382,21 +399,36 @@ Status VMergeIterator::next_batch(vectorized::Block* block) {
         _block_row_locations.resize(block_row_max);
     }
     size_t row_idx = 0;
+    VMergeIteratorContext* pre_ctx = nullptr;
     while (block->rows() < block_row_max) {
         if (_merge_heap.empty()) break;
 
         auto ctx = _merge_heap.top();

Review Comment:
   We should make this comparison inside one block as much as possible instead of always using a heap to compare rows between different blocks.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org