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

    https://github.com/apache/spark/pull/11865#discussion_r60138955
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/CoalescedRDD.scala ---
    @@ -121,6 +121,21 @@ private[spark] class CoalescedRDD[T: ClassTag](
     }
     
     /**
    + * A PartitionCoalescer defines how to coalesce the partitions of a given 
RDD.
    + */
    +trait PartitionCoalescer {
    +
    +  /**
    +   * Coalesce the partitions of the given RDD.
    +   *
    +   * @param maxPartitions the maximum number of partitions to have after 
coalescing
    +   * @param parent the parent RDD whose partitions to coalesce
    +   * @return a grouping of the parent RDD's partitions
    +   */
    +  def coalesce(maxPartitions: Int, parent: RDD[_]): Array[PartitionGroup]
    --- End diff --
    
    can you document a little bit more the semantics of the return? 
    
    i think it's better to say explicitly each element in the returned array 
represents one rdd partition post-coalescing.


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