mirror of https://github.com/apache/druid.git
Renamed sort function
This commit is contained in:
parent
2e3577cd3d
commit
134041c479
|
@ -106,7 +106,7 @@ public class ScanQueryQueryToolChest extends QueryToolChest<ScanResultValue, Sca
|
|||
public ScanBatchedTimeOrderedQueueIterator make()
|
||||
{
|
||||
return new ScanBatchedTimeOrderedQueueIterator(
|
||||
heapsortScanResultValues(scanResultIterator, scanQuery),
|
||||
sortScanResultValues(scanResultIterator, scanQuery),
|
||||
scanQuery.getBatchSize()
|
||||
);
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ public class ScanQueryQueryToolChest extends QueryToolChest<ScanResultValue, Sca
|
|||
}
|
||||
|
||||
@VisibleForTesting
|
||||
Iterator<ScanResultValue> heapsortScanResultValues(Iterator<ScanResultValue> inputIterator, ScanQuery scanQuery)
|
||||
Iterator<ScanResultValue> sortScanResultValues(Iterator<ScanResultValue> inputIterator, ScanQuery scanQuery)
|
||||
{
|
||||
Comparator<ScanResultValue> priorityQComparator = new ScanResultValueTimestampComparator(scanQuery);
|
||||
|
||||
|
@ -180,7 +180,6 @@ public class ScanQueryQueryToolChest extends QueryToolChest<ScanResultValue, Sca
|
|||
PriorityQueue<ScanResultValue> q = new PriorityQueue<>(Math.toIntExact(scanQuery.getLimit()), priorityQComparator);
|
||||
|
||||
while (inputIterator.hasNext()) {
|
||||
|
||||
ScanResultValue next = inputIterator.next();
|
||||
List<Object> events = (List<Object>) next.getEvents();
|
||||
for (Object event : events) {
|
||||
|
|
|
@ -97,7 +97,7 @@ public class ScanQueryQueryToolChestTest
|
|||
.intervals(emptySegmentSpec)
|
||||
.limit(99999)
|
||||
.build();
|
||||
Iterator<ScanResultValue> sorted = chest.heapsortScanResultValues(inputs.iterator(), scanQuery);
|
||||
Iterator<ScanResultValue> sorted = chest.sortScanResultValues(inputs.iterator(), scanQuery);
|
||||
|
||||
int count = 0;
|
||||
Long previousTime = Long.MAX_VALUE;
|
||||
|
@ -134,7 +134,7 @@ public class ScanQueryQueryToolChestTest
|
|||
.intervals(emptySegmentSpec)
|
||||
.limit(99999)
|
||||
.build();
|
||||
Iterator<ScanResultValue> sorted = chest.heapsortScanResultValues(inputs.iterator(), scanQuery);
|
||||
Iterator<ScanResultValue> sorted = chest.sortScanResultValues(inputs.iterator(), scanQuery);
|
||||
|
||||
int count = 0;
|
||||
Long previousTime = -1L;
|
||||
|
@ -169,7 +169,7 @@ public class ScanQueryQueryToolChestTest
|
|||
.intervals(emptySegmentSpec)
|
||||
.limit(99999)
|
||||
.build();
|
||||
Iterator<ScanResultValue> sorted = chest.heapsortScanResultValues(inputs.iterator(), scanQuery);
|
||||
Iterator<ScanResultValue> sorted = chest.sortScanResultValues(inputs.iterator(), scanQuery);
|
||||
|
||||
Long previousTime = Long.MAX_VALUE;
|
||||
int count = 0;
|
||||
|
@ -204,7 +204,7 @@ public class ScanQueryQueryToolChestTest
|
|||
.intervals(emptySegmentSpec)
|
||||
.limit(99999)
|
||||
.build();
|
||||
Iterator<ScanResultValue> sorted = chest.heapsortScanResultValues(inputs.iterator(), scanQuery);
|
||||
Iterator<ScanResultValue> sorted = chest.sortScanResultValues(inputs.iterator(), scanQuery);
|
||||
|
||||
Long previousTime = -1L;
|
||||
int count = 0;
|
||||
|
|
Loading…
Reference in New Issue