Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/7384#discussion_r34552205
--- Diff: core/src/main/scala/org/apache/spark/rdd/CoalescedRDD.scala ---
@@ -58,7 +58,7 @@ private[spark] case class CoalescedRDDPartition(
val parentPreferredLocations = rdd.context.getPreferredLocs(rdd,
p.index).map(_.host)
preferredLocation.exists(parentPreferredLocations.contains)
}
- if (parents.size == 0) 0.0 else (loc.toDouble / parents.size.toDouble)
--- End diff --
There's nothing wrong with the change per se, although even if it's faster
(usually this is implemented as `size == 0` inside a collection anyway), it's
negligible unless it's a tight loop, and this isn't. Given that it ends up
taking at least an hour of time, added up over everyone that looks at, tests
and merges this, that I would prefer people not open tiny PRs that have
virtually no effect.
---
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]