Github user mridulm commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15612#discussion_r84743321
  
    --- Diff: 
core/src/main/scala/org/apache/spark/rdd/ZippedPartitionsRDD.scala ---
    @@ -58,10 +63,14 @@ private[spark] abstract class 
ZippedPartitionsBaseRDD[V: ClassTag](
             s"Can't zip RDDs with unequal numbers of partitions: 
${rdds.map(_.partitions.length)}")
         }
         Array.tabulate[Partition](numParts) { i =>
    -      val prefs = rdds.map(rdd => 
rdd.preferredLocations(rdd.partitions(i)))
    -      // Check whether there are any hosts that match all RDDs; otherwise 
return the union
    -      val exactMatchLocations = prefs.reduce((x, y) => x.intersect(y))
    -      val locs = if (!exactMatchLocations.isEmpty) exactMatchLocations 
else prefs.flatten.distinct
    +      val locs = if (preferredLocationRDD != null) {
    +        
preferredLocationRDD.preferredLocations(preferredLocationRDD.partitions(i))
    --- End diff --
    
    What happens when there are no preferred location for a partition in 
preferredLocationRDD ?
    Do we want to fallback to earlier computation ? (which becomes a distinct 
union I guess)


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to