mirror of https://github.com/apache/druid.git
Fix bug messing up count of rows
This commit is contained in:
parent
219af478c8
commit
35692680fc
|
@ -268,11 +268,10 @@ public class ScanQueryRunnerFactory implements QueryRunnerFactory<ScanResultValu
|
|||
if (q.size() > limit) {
|
||||
q.poll();
|
||||
}
|
||||
}
|
||||
yielder = yielder.next(null);
|
||||
|
||||
// Finish scanning the interval containing the limit row
|
||||
if (numRowsScanned > limit && finalInterval == null) {
|
||||
long timestampOfLimitRow = next.getFirstEventTimestamp(scanQuery.getResultFormat());
|
||||
long timestampOfLimitRow = srv.getFirstEventTimestamp(scanQuery.getResultFormat());
|
||||
for (SegmentDescriptor descriptor : descriptorsOrdered) {
|
||||
if (descriptor.getInterval().contains(timestampOfLimitRow)) {
|
||||
finalInterval = descriptor.getInterval();
|
||||
|
@ -282,6 +281,8 @@ public class ScanQueryRunnerFactory implements QueryRunnerFactory<ScanResultValu
|
|||
throw new ISE("WTH??? Row came from an unscanned interval?");
|
||||
}
|
||||
}
|
||||
}
|
||||
yielder = yielder.next(null);
|
||||
doneScanning = yielder.isDone() ||
|
||||
(finalInterval != null &&
|
||||
!finalInterval.contains(next.getFirstEventTimestamp(scanQuery.getResultFormat())));
|
||||
|
|
Loading…
Reference in New Issue