gortiz commented on code in PR #12783:
URL: https://github.com/apache/pinot/pull/12783#discussion_r1552042946


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/SortOperator.java:
##########
@@ -129,16 +128,19 @@ private TransferableBlock produceSortedBlock() {
         return TransferableBlockUtils.getEndOfStreamTransferableBlock();
       }
     } else {
-      LinkedList<Object[]> rows = new LinkedList<>();
-      while (_priorityQueue.size() > _offset) {
-        Object[] row = _priorityQueue.poll();
-        rows.addFirst(row);
-      }
-      if (rows.size() == 0) {
+      int resultSize = _priorityQueue.size() - _offset;
+      if (resultSize == 0) {

Review Comment:
   I'll try to change that tomorrow



-- 
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]

Reply via email to