jon-wei commented on a change in pull request #7133: 6088 - Time Ordering On
Scans
URL: https://github.com/apache/incubator-druid/pull/7133#discussion_r263618624
##########
File path:
processing/src/main/java/org/apache/druid/query/scan/ScanQueryEngine.java
##########
@@ -123,15 +123,18 @@
if (responseContext.get(ScanQueryRunnerFactory.CTX_COUNT) == null) {
responseContext.put(ScanQueryRunnerFactory.CTX_COUNT, 0L);
}
- final long limit = query.getLimit() - (long)
responseContext.get(ScanQueryRunnerFactory.CTX_COUNT);
+ final long limit = query.getTimeOrder().equals(ScanQuery.TimeOrder.NONE) ?
+ query.getLimit() - (long)
responseContext.get(ScanQueryRunnerFactory.CTX_COUNT) :
+ Long.MAX_VALUE;
return Sequences.concat(
adapter
.makeCursors(
filter,
intervals.get(0),
query.getVirtualColumns(),
Granularities.ALL,
- query.isDescending(),
+
query.getTimeOrder().equals(ScanQuery.TimeOrder.DESCENDING) ||
Review comment:
I think this condition would be more readable as a separate method
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]