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


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxSendOperator.java:
##########
@@ -151,10 +152,18 @@ protected TransferableBlock getNextBlock() {
     try {
       transferableBlock = _dataTableBlockBaseOperator.nextBlock();
       while (!transferableBlock.isNoOpBlock()) {
-        _exchange.send(transferableBlock);
         if (transferableBlock.isEndOfStreamBlock()) {
-          return transferableBlock;
+          if (transferableBlock.isSuccessfulEndOfStreamBlock()) {
+            TransferableBlock eosBlockWithStats = 
TransferableBlockUtils.getEndOfStreamTransferableBlock(
+                
OperatorUtils.getMetadataFromOperatorStats(_opChainStats.getOperatorStatsMap()));
+            _exchange.send(eosBlockWithStats);
+            return eosBlockWithStats;

Review Comment:
   - `_exchange.send(eosBlockWithStats)` sends to the next opChain
   - `return eosBlockWithStats` is returning to the opChainScheduler. 
    
   do we process anything related to stats on opChainScheduler? if not 
returning the original transferableBlock seems more reasonable



##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MultiStageOperator.java:
##########
@@ -39,21 +35,18 @@ public abstract class MultiStageOperator implements 
Operator<TransferableBlock>,
 
   // TODO: Move to OperatorContext class.
   protected final OperatorStats _operatorStats;

Review Comment:
   IIUC, there will be 0 or 1 OperatorStats object corresponding to this 
operator in the OpChainStats map. if so why do we keep strong reference to both 
objects in 2 classes? 



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