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


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MultiStageOperator.java:
##########
@@ -64,8 +65,15 @@ public TransferableBlock nextBlock() {
     try (InvocationScope ignored = 
Tracing.getTracer().createScope(getClass())) {
       _operatorStats.startTimer();
       TransferableBlock nextBlock = getNextBlock();
+
+      if (!_firstDataBlockEncountered && nextBlock.isNoOpBlock()) {
+        _operatorStats.resetStartTime();
+      } else {
+        _firstDataBlockEncountered = true;
+        _operatorStats.endTimer();
+      }
+

Review Comment:
   Let's do it differently
   
   ```suggestion
         _operatorStats.startTimer();
         TransferableBlock nextBlock = getNextBlock();
         _operatorStats.endTimer(nextBlock);
   ```



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