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


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/AggregateOperator.java:
##########
@@ -91,6 +93,7 @@ public AggregateOperator(Operator<TransferableBlock> 
inputOperator, DataSchema d
     }
     _resultSchema = dataSchema;
 
+    _readyToConstruct = false;
     _isCumulativeBlockConstructed = false;

Review Comment:
   it's not actually the same thing 😢 the first time you hit `produce` you have 
`_readyToConstruct && !_isCumulativeBlockConstructed`, so you build and return 
the block. The second time, you have `_readyToConstruct && 
_isCumulativeBlockConstructed` so you return `EOS` block (this is one of the 
reasons the generic state machine is complicated)
   
   I can rename it to `_hasReturnedAggregateBlock` if that's clearer



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