clintropolis commented on code in PR #18441:
URL: https://github.com/apache/druid/pull/18441#discussion_r2326159228
##########
multi-stage-query/src/main/java/org/apache/druid/msq/querykit/scan/ScanQueryFrameProcessor.java:
##########
@@ -479,6 +522,16 @@ private long setNextCursor(
this.cursorCloser = cursorCloser;
this.segment = segment;
this.cursorOffset.reset();
+ this.cursorRowsRead = 0;
+
+ if (query.isLimited()
+ && ordering.size() >= query.getOrderBys().size()
+ && query.getOrderBys().equals(ordering.subList(0,
query.getOrderBys().size()))) {
Review Comment:
well, i suppose its not very sophisticated right now in terms of how it
reports ordering when i look at the code for queryable index holder,
```
final List<OrderBy> indexOrdering = index.getOrdering();
if (Cursors.preferDescendingTimeOrdering(cursorBuildSpec)
&& Cursors.getTimeOrdering(indexOrdering) == Order.ASCENDING) {
this.ordering = Cursors.descendingTimeOrder();
} else {
this.ordering = indexOrdering;
}
```
but probably good enough for now
--
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]