spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatorsmile <...@git.apache.org>
Subject [GitHub] spark pull request #18861: [SPARK-19426][SQL] Custom coalescer for Dataset
Date Mon, 07 Aug 2017 04:29:08 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message