walterddr commented on code in PR #9484:
URL: https://github.com/apache/pinot/pull/9484#discussion_r997098521


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/GrpcReceivingMailbox.java:
##########
@@ -50,15 +58,26 @@ public void init(MailboxContentStreamObserver 
streamObserver) {
     }
   }
 
+  /**
+   * Polls the underlying channel and converts the received data into a 
TransferableBlock. This may return null in the
+   * following cases:
+   *
+   * <p>
+   *  1. If the mailbox hasn't initialized yet. This means we haven't received 
any data yet.
+   *  2. If the received block from the sender didn't have any rows.
+   * </p>
+   */
   @Override
-  public MailboxContent receive()
+  public TransferableBlock receive()
       throws Exception {
     MailboxContent mailboxContent = null;
     if (waitForInitialize()) {
       mailboxContent = _contentStreamObserver.poll();
       _totalMsgReceived.incrementAndGet();
+    } else {
+      return null;
     }
-    return mailboxContent;
+    return fromMailboxContent(mailboxContent);

Review Comment:
   ```
       if (!waitForInitialize()) {
         return null;
       }
       mailboxContent = _contentStreamObserver.poll();
       _totalMsgReceived.incrementAndGet();
       return fromMailboxContent(mailboxContent);
   ```



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