HeartSaVioR commented on code in PR #59608:
URL: https://github.com/apache/spark/pull/59608#discussion_r4333267641
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/operators/stateful/StatefulStreamlineAggregateExec.scala:
##########
@@ -300,10 +300,6 @@ case class StatefulStreamlineAggregateExec(
incrementalEvictionIter.foreach { evictionIter =>
allRemovalsTimeMs += timeTakenMs {
var numRemovalsCurrRecord = 0
- // NOTE: EvictionIterator removes (and counts) a row inside
hasNext, not next(), so
Review Comment:
nit: We actually have similar comments in other places as well.
*
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/operators/stateful/statefulOperators.scala:1432
- note says deletion happens in hasNext.
*
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingAggregationSuite.scala:1276
- the append-mode test comment also explicitly says it “removes in hasNext.”
Since we are here, shall we fix them as well? Not a blocker for sure but
since we are updating the code comment here.
--
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]