agavra commented on code in PR #9887:
URL: https://github.com/apache/pinot/pull/9887#discussion_r1041193826


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java:
##########
@@ -122,24 +122,27 @@ protected TransferableBlock getNextBlock() {
 
   private void buildBroadcastHashTable() {
     TransferableBlock rightBlock = _rightTableOperator.nextBlock();
-    if (rightBlock.isErrorBlock()) {
-      _upstreamErrorBlock = rightBlock;
-      return;
-    }
+    while (!rightBlock.isNoOpBlock()) {

Review Comment:
   this is correct, but there's no assumption on exaclty-once semantics for 
`onDatAvailable` (which is the more generalized rule for the problem you are 
talking about - it's even documented in the code):
   ```
     /**
      * This method should be called whenever data is available in a given 
mailbox.
      * Implementations of this method should be idempotent, it may be called 
in the
      * scenario that no mail is available.
      *
      * @param mailbox the identifier of the mailbox that now has data
      */
     public final void onDataAvailable(MailboxIdentifier mailbox) {
       _monitor.enter();
       try {
         _scheduler.onDataAvailable(mailbox);
       } finally {
         _monitor.leave();
       }
     }
   ```
   
   The HJOperator will simply "do nothing" if no data is available on the side 
that it currently needs. We could make this more efficient, but I don't think 
it's worth it at the moment.



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