HappenLee commented on code in PR #12316: URL: https://github.com/apache/doris/pull/12316#discussion_r964528447
########## be/src/vec/olap/vgeneric_iterators.cpp: ########## @@ -239,7 +254,7 @@ class VMergeIteratorContext { void reset_cur_batch() { _cur_batch_num = 0; } bool is_cur_block_finished() { - if (_index_in_block == _block.rows() - 1) { + if (_index_in_block == _block->rows() - 1) { Review Comment: return `_index_in_block == _block->rows() - 1` ########## be/src/vec/olap/vgeneric_iterators.cpp: ########## @@ -298,8 +314,23 @@ Status VMergeIteratorContext::advance() { Status VMergeIteratorContext::_load_next_block() { do { - block_reset(); - Status st = _iter->next_batch(&_block); + if (_block != nullptr) { + _block_list.push_back(_block); + _block = nullptr; + } + for (auto it = _block_list.begin(); it != _block_list.end(); it++) { + if (it->use_count() <= 1) { Review Comment: only == 1, do not lower -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org