gianm commented on code in PR #20589:
URL: https://github.com/apache/druid/pull/20589#discussion_r4278868443
##########
multi-stage-query/src/main/java/org/apache/druid/msq/querykit/scan/ScanQueryFrameProcessor.java:
##########
@@ -557,19 +562,29 @@ private long setNextCursor(
if (query.isLimited()
&& ordering.size() >= query.getOrderBys().size()
&& query.getOrderBys().equals(ordering.subList(0,
query.getOrderBys().size()))) {
- cursorPushDownLimit = getQueryOffsetPlusLimit();
+ cursorPushDownLimit = queryOffsetPlusLimit;
} else {
cursorPushDownLimit = NO_LIMIT;
}
return rowsFlushed;
}
+ /**
+ * Whether the limit in {@link #sharedRunningCountForLimit} has been
reached, or would be reached if
+ * {@code pendingRows} were added.
+ */
+ private boolean isSharedLimitReached(final long pendingRows)
+ {
+ return sharedRunningCountForLimit != null
+ && sharedRunningCountForLimit.get() + pendingRows >=
queryOffsetPlusLimit;
Review Comment:
same comment as
https://github.com/apache/druid/pull/20589#discussion_r4278866463, I think it's
OK.
--
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]