attilapiros commented on code in PR #47856: URL: https://github.com/apache/spark/pull/47856#discussion_r2072685423
########## core/src/main/scala/org/apache/spark/util/collection/Spillable.scala: ########## @@ -90,11 +98,10 @@ private[spark] abstract class Spillable[C](taskMemoryManager: TaskMemoryManager) // or we already had more memory than myMemoryThreshold), spill the current collection shouldSpill = currentMemory >= myMemoryThreshold } - shouldSpill = shouldSpill || _elementsRead > numElementsForceSpillThreshold Review Comment: This was the only place where `shouldSpill` was written so after this the `shouldSpill` can be a `val` and not a `var`. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org