zuochunwei commented on a change in pull request #7852:
URL: https://github.com/apache/incubator-doris/pull/7852#discussion_r791334747



##########
File path: be/src/olap/rowset/segment_v2/segment_iterator.cpp
##########
@@ -872,13 +867,13 @@ Status SegmentIterator::next_batch(vectorized::Block* 
block) {
         RETURN_IF_ERROR(_init(true));
         _inited = true;
         if (!_vec_pred_column_ids.empty() || 
!_short_cir_pred_column_ids.empty()) {
-            _block_rowids.reserve(_opts.block_row_max);
+            _block_rowids.resize(_opts.block_row_max);

Review comment:
       reverve just alloc memory for optimization reason.
   
   there is one basic rule: any reserve calls can be removed, this removing 
operation will not influence the correctness of result.
   
   according this rule, if we remove this _block_rowids.reserve(), the will 
crash, so we should use resize instead.




-- 
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

Reply via email to