yiguolei commented on code in PR #10506:
URL: https://github.com/apache/doris/pull/10506#discussion_r910580765


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -971,21 +955,13 @@ void 
SegmentIterator::_read_columns_by_rowids(std::vector<ColumnId>& read_column
                                               uint16_t* sel_rowid_idx, size_t 
select_size,
                                               vectorized::MutableColumns* 
mutable_columns) {
     SCOPED_RAW_TIMER(&_opts.stats->lazy_read_ns);
-    size_t start_idx = 0;
-    while (start_idx < select_size) {
-        size_t end_idx = start_idx + 1;
-        while (end_idx < select_size && (rowid_vector[sel_rowid_idx[end_idx - 
1]] ==
-                                         rowid_vector[sel_rowid_idx[end_idx]] 
- 1)) {
-            end_idx++;
-        }
-        size_t range = end_idx - start_idx;
-        {
-            _opts.stats->block_lazy_read_seek_num += 1;
-            SCOPED_RAW_TIMER(&_opts.stats->block_lazy_read_seek_ns);
-            _seek_columns(read_column_ids, 
rowid_vector[sel_rowid_idx[start_idx]]);
-        }
-        _read_columns(read_column_ids, *mutable_columns, range);
-        start_idx += range;
+    rowid_t rowids[select_size];

Review Comment:
   Not sure dynamic array's performace. Better use vector.



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

Reply via email to