davintjong-db commented on code in PR #44583:
URL: https://github.com/apache/spark/pull/44583#discussion_r1441155791


##########
core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala:
##########
@@ -316,11 +316,11 @@ class LongAccumulator extends AccumulatorV2[jl.Long, 
jl.Long] {
   private var _count = 0L
 
   /**
-   * Returns false if this accumulator has had any values added to it or the 
sum is non-zero.
+   * Returns true if this accumulator has had any values added to it or the 
sum is non-zero.
    *
    * @since 2.0.0
    */
-  override def isZero: Boolean = _sum == 0L && _count == 0
+  override def isUpdated: Boolean = _sum != 0L || _count != 0

Review Comment:
   Ah, this change probably isn't worth it then. Changing the comment and the 
other rename is probably still good, though. cc @arvindsaik



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