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

    https://github.com/apache/spark/pull/369#discussion_r13423508
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
    @@ -423,6 +423,18 @@ abstract class RDD[T: ClassTag](
       def ++(other: RDD[T]): RDD[T] = this.union(other)
     
       /**
    +   * Return this RDD sorted by the given key function.
    +   */
    +  def sortBy[K](
    +      f: (T) ⇒ K,
    +      ascending: Boolean = true,
    +      numPartitions: Int = this.partitions.size)
    +      (implicit ord: Ordering[K], ctag: ClassTag[K]): RDD[T] =
    --- End diff --
    
    https://issues.apache.org/jira/browse/SPARK-1540
    
https://github.com/apache/spark/commit/640f9a0efefd42cff86aecd4878a3a57f5ae85fa
    
    
    On Wed, Jun 4, 2014 at 8:14 PM, Wenchen Fan <notificati...@github.com>
    wrote:
    
    > In core/src/main/scala/org/apache/spark/rdd/RDD.scala:
    >
    > > @@ -423,6 +423,18 @@ abstract class RDD[T: ClassTag](
    > >    def ++(other: RDD[T]): RDD[T] = this.union(other)
    > >
    > >    /**
    > > +   * Return this RDD sorted by the given key function.
    > > +   */
    > > +  def sortBy[K](
    > > +      f: (T) ⇒ K,
    > > +      ascending: Boolean = true,
    > > +      numPartitions: Int = this.partitions.size)
    > > +      (implicit ord: Ordering[K], ctag: ClassTag[K]): RDD[T] =
    >
    > @markhamstra <https://github.com/markhamstra> I checked RDD.scala and
    > found the style you talked about. But one thing I don't understand is:def
    > countByValue()(implicit ord: Ordering[T] = null). I can't find the use of
    > implicit Ordering[T] anywhere inside the method, and I compiled spark
    > successfully with this implicit Ordering[T] removed. Did I miss something
    > here?
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/spark/pull/369/files#r13422474>.
    >


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

Reply via email to