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

    https://github.com/apache/spark/pull/7536#discussion_r36378157
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/CoalescedRDD.scala ---
    @@ -295,7 +295,15 @@ private class PartitionCoalescer(maxPartitions: Int, 
prev: RDD[_], balanceSlack:
     
         val r1 = rnd.nextInt(groupArr.size)
         val r2 = rnd.nextInt(groupArr.size)
    -    val minPowerOfTwo = if (groupArr(r1).size < groupArr(r2).size) 
groupArr(r1) else groupArr(r2)
    +    val minPowerOfTwo = if (p.isInstanceOf[HadoopPartition]) {
    +      val groupLen1 = groupArr(r1).arr.map(part =>
    +        part.asInstanceOf[HadoopPartition].inputSplit.value.getLength).sum
    +      val groupLen2 = groupArr(r1).arr.map(part =>
    --- End diff --
    
    @hellertime Yes, I'll fix this bug, thanks.


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

Reply via email to