adonis0147 commented on code in PR #10386:
URL: https://github.com/apache/doris/pull/10386#discussion_r906073521
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -872,9 +872,11 @@ Status SegmentIterator::_read_columns_by_index(uint32_t
nrows_read_limit, uint32
_read_columns(_first_read_column_ids, _current_return_columns,
rows_to_read));
_cur_rowid += rows_to_read;
if (set_block_rowid) {
- for (uint32_t rid = range_from; rid < range_to; rid++) {
- _block_rowids[nrows_read++] = rid;
- }
+ // Here use std::iota is better performance than for-loop, maybe
for-loop is not vectorized
Review Comment:
Why not just change the interface `SegmentIterator::_read_columns_by_index`
to
```cpp
Status SegmentIterator::_read_columns_by_index(uint64_t nrows_read_limit,
uint64_t& nrows_read,
bool set_block_rowid) {
```
--
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]