Github user smallory commented on a diff in the pull request:
https://github.com/apache/spark/pull/20790#discussion_r174225748
--- Diff: core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala ---
@@ -290,7 +290,8 @@ class LongAccumulator extends AccumulatorV2[jl.Long,
jl.Long] {
private var _count = 0L
/**
- * Adds v to the accumulator, i.e. increment sum by v and count by 1.
+ * Returns false if this accumulator has had any values added to it or
the sum is non-zero.
+ *
--- End diff --
The current documentation for AccumulatorV2.isZero would be misleading for
the behaviour shown when values have been added to the accumulator, but the sum
is zero. This still would return false, even though it is a non-count
accumulator. I don't believe that any of the implementations in this file
actually behave exactly as described by AccumulatorV2.isZero.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]