ankitsultana commented on code in PR #9484:
URL: https://github.com/apache/pinot/pull/9484#discussion_r995377631
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperator.java:
##########
@@ -116,26 +112,16 @@ protected TransferableBlock getNextBlock() {
hasOpenedMailbox = false;
for (ServerInstance sendingInstance : _sendingStageInstances) {
try {
- ReceivingMailbox<Mailbox.MailboxContent> receivingMailbox =
+ ReceivingMailbox<TransferableBlock> receivingMailbox =
_mailboxService.getReceivingMailbox(toMailboxId(sendingInstance));
// TODO this is not threadsafe.
// make sure only one thread is checking receiving mailbox and
calling receive() then close()
if (!receivingMailbox.isClosed()) {
hasOpenedMailbox = true;
- Mailbox.MailboxContent mailboxContent = receivingMailbox.receive();
- if (mailboxContent != null) {
- ByteBuffer byteBuffer =
mailboxContent.getPayload().asReadOnlyByteBuffer();
- if (byteBuffer.hasRemaining()) {
- BaseDataBlock dataBlock =
DataBlockUtils.getDataBlock(byteBuffer);
- if (dataBlock instanceof MetadataBlock &&
!dataBlock.getExceptions().isEmpty()) {
- _upstreamErrorBlock =
TransferableBlockUtils.getErrorTransferableBlock(dataBlock.getExceptions());
- return _upstreamErrorBlock;
- }
- if (dataBlock.getNumberOfRows() > 0) {
- // here we only return data table block when it is not empty.
- return new TransferableBlock(dataBlock);
- }
Review Comment:
Other than the number of rows check is there anything else which is not
equivalent?
--
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]