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

    https://github.com/apache/spark/pull/18861#discussion_r131570851
  
    --- Diff: core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala ---
    @@ -1185,23 +1194,21 @@ class SizeBasedCoalescer(val maxSize: Int) extends 
PartitionCoalescer with Seria
           totalSum += splitSize
         }
     
    -    while (index < partitions.size) {
    +    while (index < partitions.length) {
           val partition = partitions(index)
    -      val fileSplit =
    -        
partition.asInstanceOf[HadoopPartition].inputSplit.value.asInstanceOf[FileSplit]
    -      val splitSize = fileSplit.getLength
    +      val splitSize = getPartitionSize(partition)
           if (currentSum + splitSize < maxSize) {
             addPartition(partition, splitSize)
             index += 1
    -        if (index == partitions.size) {
    -          updateGroups
    +        if (index == partitions.length) {
    +          updateGroups()
             }
           } else {
    -        if (currentGroup.partitions.size == 0) {
    +        if (currentGroup.partitions.isEmpty) {
               addPartition(partition, splitSize)
               index += 1
             } else {
    -          updateGroups
    +          updateGroups()
    --- End diff --
    
    All the above changes are not related to this PR, right?


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