Github user yaoxin226 commented on a diff in the pull request:
https://github.com/apache/spark/pull/7384#discussion_r34658371
--- 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 --
Totally agree with you. Really sorry for bothering everyone.
However, when we do the math, I think another thing we should consider is
the time that will be spent on reading the code. The code will be read again
and again even by the same people. Even if it can only reduce 1 second for each
code reading, that will also be a huge aggregate time saving.
For this PR, I assume this part of code won't be read that much. So it
isn't worth to do it.
Thanks for the sharing.
---
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]