LuciferYang commented on code in PR #43890:
URL: https://github.com/apache/spark/pull/43890#discussion_r1403904470
##########
core/src/main/scala/org/apache/spark/partial/GroupedCountEvaluator.scala:
##########
@@ -41,7 +41,10 @@ private[spark] class GroupedCountEvaluator[T :
ClassTag](totalOutputs: Int, conf
override def currentResult(): Map[T, BoundedDouble] = {
if (outputsMerged == totalOutputs) {
- sums.map { case (key, sum) => (key, new BoundedDouble(sum, 1.0, sum,
sum)) }.toMap
+ sums.map { case (key, sum) => (
+ key,
+ new BoundedDouble(sum.toDouble, 1.0, sum.toDouble, sum.toDouble)
+ ) }.toMap
Review Comment:
nit:
```scala
sums.map { case (key, sum) =>
(key, new BoundedDouble(sum.toDouble, 1.0, sum.toDouble, sum.toDouble))
}.toMap
```
--
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]