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

    https://github.com/apache/spark/pull/144#discussion_r10633006
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
    @@ -958,6 +958,10 @@ abstract class RDD[T: ClassTag](
        */
       def takeOrdered(num: Int)(implicit ord: Ordering[T]): Array[T] = 
top(num)(ord.reverse)
     
    +  def max()(implicit ord: Ordering[T]):T = this.reduce{(x,y) => 
ord.max(x,y)}
    --- End diff --
    
    I believe you can do `this.reduce(ord.max)`, and same for the min below


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