Github user maropu commented on a diff in the pull request: https://github.com/apache/spark/pull/18861#discussion_r131571547 --- 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 -- ok, I'll drop these from this pr.
--- 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