spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srowen <...@git.apache.org>
Subject [GitHub] spark pull request #17697: [SPARK-20414][MLLIB] avoid creating only 16 reduc...
Date Mon, 01 May 2017 19:26:19 GMT
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17697#discussion_r114182801
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/rdd/MLPairRDDFunctions.scala ---
    @@ -49,6 +49,18 @@ class MLPairRDDFunctions[K: ClassTag, V: ClassTag](self: RDD[(K, V)])
extends Se
           }
         ).mapValues(_.toArray.sorted(ord.reverse))  // This is a min-heap, so we reverse
the order.
       }
    +
    +  def topByKey(num: Int, bucketsCount: Int = 200)(implicit ord: Ordering[V]): RDD[(K,
Array[V])] = {
    --- End diff --
    
    Doesn't this make a call to `topByKey(n)` ambiguous? maybe not, but seems like it should.
I don't think you want a default value here. The 'default' case is the existing method.


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