HappenLee commented on code in PR #45952:
URL: https://github.com/apache/doris/pull/45952#discussion_r1900388777
##########
be/src/vec/core/sort_cursor.h:
##########
@@ -264,6 +275,21 @@ struct MergeSortCursor {
return greater_at(rhs, impl->rows - 1, 0) == -1;
}
+ /// Checks that all rows in the current block of this cursor are less than
or equal to all the rows of the current block of another cursor.
+ bool totally_less_or_equals(const MergeSortCursor& rhs) const {
+ if (impl->rows == 0 || rhs.impl->rows == 0) {
+ return false;
+ }
+
+ /// The last row of this cursor is no larger than the first row of the
another cursor.
+ return greater_at(rhs, impl->rows - 1, 0) <= 0;
Review Comment:
why here is first row? maybe pos is faster ?
--
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]