diff --git a/processing/src/main/java/org/apache/druid/query/scan/ScanQueryQueryToolChest.java b/processing/src/main/java/org/apache/druid/query/scan/ScanQueryQueryToolChest.java index 43a55ea10e9..863f4b944cd 100644 --- a/processing/src/main/java/org/apache/druid/query/scan/ScanQueryQueryToolChest.java +++ b/processing/src/main/java/org/apache/druid/query/scan/ScanQueryQueryToolChest.java @@ -106,7 +106,7 @@ public class ScanQueryQueryToolChest extends QueryToolChest heapsortScanResultValues(Iterator inputIterator, ScanQuery scanQuery) + Iterator sortScanResultValues(Iterator inputIterator, ScanQuery scanQuery) { Comparator priorityQComparator = new ScanResultValueTimestampComparator(scanQuery); @@ -180,7 +180,6 @@ public class ScanQueryQueryToolChest extends QueryToolChest q = new PriorityQueue<>(Math.toIntExact(scanQuery.getLimit()), priorityQComparator); while (inputIterator.hasNext()) { - ScanResultValue next = inputIterator.next(); List events = (List) next.getEvents(); for (Object event : events) { diff --git a/processing/src/test/java/org/apache/druid/query/scan/ScanQueryQueryToolChestTest.java b/processing/src/test/java/org/apache/druid/query/scan/ScanQueryQueryToolChestTest.java index 10364ae2743..8a057924d89 100644 --- a/processing/src/test/java/org/apache/druid/query/scan/ScanQueryQueryToolChestTest.java +++ b/processing/src/test/java/org/apache/druid/query/scan/ScanQueryQueryToolChestTest.java @@ -97,7 +97,7 @@ public class ScanQueryQueryToolChestTest .intervals(emptySegmentSpec) .limit(99999) .build(); - Iterator sorted = chest.heapsortScanResultValues(inputs.iterator(), scanQuery); + Iterator 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 sorted = chest.heapsortScanResultValues(inputs.iterator(), scanQuery); + Iterator 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 sorted = chest.heapsortScanResultValues(inputs.iterator(), scanQuery); + Iterator 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 sorted = chest.heapsortScanResultValues(inputs.iterator(), scanQuery); + Iterator sorted = chest.sortScanResultValues(inputs.iterator(), scanQuery); Long previousTime = -1L; int count = 0;