Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/6352#discussion_r30941932
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -386,13 +386,15 @@ class DAGScheduler(
def visit(rdd: RDD[_]) {
if (!visited(rdd)) {
visited += rdd
- if (getCacheLocs(rdd).contains(Nil)) {
--- End diff --
As a general aside, I find `getCacheLocs(rdd).contains(Nil)` to be hard to
understand to begin with. I think that this condition is meant to be read as
"if at least one partition of this RDD is not cached anywhere...". Maybe this
code would be easier to review / parse if we extracted this condition into a
variable, perhaps a lazy val if we want to short-circuit, named
`rddHasUncachedPartitions`, or `!rddIsCached`.
---
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]