somandal commented on code in PR #10408:
URL: https://github.com/apache/pinot/pull/10408#discussion_r1136539557
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperator.java:
##########
@@ -176,6 +214,18 @@ protected TransferableBlock getNextBlock() {
}
}
+ if (((openMailboxCount == 0) || (openMailboxCount <= eosMailboxCount))
+ && (!CollectionUtils.isEmpty(_priorityQueue)) &&
!_isSortedBlockConstructed) {
+ // Some data is present in the PriorityQueue, these need to be sent
upstream
+ LinkedList<Object[]> rows = new LinkedList<>();
+ while (_priorityQueue.size() > 0) {
+ Object[] row = _priorityQueue.poll();
+ rows.addFirst(row);
+ }
+ _isSortedBlockConstructed = true;
+ return new TransferableBlock(rows, _dataSchema, DataBlock.Type.ROW);
+ }
Review Comment:
Agreed, I've modified the code to drop the contents of the `_priorityQueue`
on receiving an error block. Keeping this block as is. Let me know if you
intended for a different change here.
--
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]