Github user holdenk commented on a diff in the pull request:
https://github.com/apache/spark/pull/11105#discussion_r86460332
--- Diff: core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala ---
@@ -306,18 +428,19 @@ class LongAccumulator extends AccumulatorV2[jl.Long,
jl.Long] {
/**
* Adds v to the accumulator, i.e. increment sum by v and count by 1.
- * @since 2.0.0
+ * Added for simplicity with adding non java Longs.
+ * @since 2.1.0
*/
- override def add(v: jl.Long): Unit = {
- _sum += v
- _count += 1
+ def add(v: Long): Unit = {
--- End diff --
So we could do that, but it seems like maybe having the specialized is
better than copying that code? I don't have super strong feelings about this
but just something to consider.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]