xiaokang commented on code in PR #10694: URL: https://github.com/apache/doris/pull/10694#discussion_r937402867
########## be/src/olap/rowset/segment_v2/segment_iterator.cpp: ########## @@ -915,7 +959,8 @@ Status SegmentIterator::_read_columns_by_index(uint32_t nrows_read_limit, uint32 } else { nrows_read += rows_to_read; } - } while (nrows_read < nrows_read_limit); + // if _opts.read_orderby_key_reverse is true, only read one range for fast reverse purpose Review Comment: OK. It's related to the code 'reverse block row order' at the end of SegmentIterator::next_batch. If we read more than one range in reverse order here, such as range10 with rows 9000 ~ 10000 and range9 with rows 8000 ~ 9000, the block will contain non-continous ordered rows 9000 ~ 10000,8000 ~ 9000. Then the reverse block at the end of next_batch will get rows 9000 ~ 8000,10000 ~ 9000. It's not totally in reversed order. -- 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