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

    https://github.com/apache/spark/pull/11327#discussion_r54418281
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/CoalescedRDD.scala ---
    @@ -192,7 +192,8 @@ private class PartitionCoalescer(maxPartitions: Int, 
prev: RDD[_], balanceSlack:
         def resetIterator(): Iterator[(String, Partition)] = {
           val iterators = (0 to 2).map( x =>
             prev.partitions.iterator.flatMap(p => {
    -          if (currPrefLocs(p).size > x) Some((currPrefLocs(p)(x), p)) else 
None
    +          val locs = currPrefLocs(p)
    +          if (locs.size > x) Some((locs(x), p)) else None
    --- End diff --
    
    @rxin I don't follow your first sentence? 
    
    Second sentence says use size for a collection and Seq is a collection.


---
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