siddharthteotia commented on code in PR #9064:
URL: https://github.com/apache/pinot/pull/9064#discussion_r927868625


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/AggregateOperator.java:
##########
@@ -120,14 +108,17 @@ public String toExplainString() {
   protected TransferableBlock getNextBlock() {
     try {
       cumulateAggregationBlocks();
-      return new TransferableBlock(toResultBlock());
+      return toResultBlock();
     } catch (Exception e) {
       return TransferableBlockUtils.getErrorTransferableBlock(e);
     }
   }
 
-  private BaseDataBlock toResultBlock()
+  private TransferableBlock toResultBlock()
       throws IOException {
+    if (_upstreamErrorBlock != null) {

Review Comment:
   Is my following understanding correct regarding error handling ?
   
   Say stage 0 ,1, 2 from root to leaf. 
   
   Regardless of which operator in a given stage is the main origin of error, 
the broadcast of errors to downstream operators / stages is always done by the 
sender / root operator in the stage that caught error ?
   
   For example, stage 2 is running on a node N and has 3 operators O1 -> O2 -> 
O3. If O3 catches error, it is still going to the return a block to O2 and O2 
to O1 that indicates error, but O1 (which should be the sender operator in 
stage 2) will create a TransferableBlock for error and send to all receivers in 
the downstream stage ?
   
   Does that mean when stages are setup, regardless of the exchange type 
between two stages, each sender in the  upstream stage has to be aware of each 
receiver in the downstream stage ?



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to