jackwener commented on code in PR #10694: URL: https://github.com/apache/doris/pull/10694#discussion_r916590916
########## be/src/olap/reader.cpp: ########## @@ -197,11 +197,17 @@ Status TabletReader::_capture_rs_readers(const ReaderParams& read_params, // it's ok for rowset to return unordered result need_ordered_result = false; } + + if (read_params.read_orderby_key) { + need_ordered_result = true; Review Comment: need_ordered_result = read_params.read_orderby_key ########## be/src/olap/rowset/rowset_reader_context.h: ########## @@ -34,6 +34,9 @@ struct RowsetReaderContext { const TabletSchema* tablet_schema = nullptr; // whether rowset should return ordered rows. bool need_ordered_result = true; + // Review Comment: Forgot to comment? ########## be/src/vec/olap/vcollect_iterator.h: ########## @@ -102,12 +102,14 @@ class VCollectIterator { // if row cursors equal, compare data version. class LevelIteratorComparator { public: - LevelIteratorComparator(int sequence = -1) : _sequence(sequence) {} + LevelIteratorComparator(int sequence, bool is_reverse) : + _sequence(sequence), _is_reverse(is_reverse) {} bool operator()(LevelIterator* lhs, LevelIterator* rhs); private: int _sequence; + bool _is_reverse = false; Review Comment: Add comment explain its function? -- 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