You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by srowen <gi...@git.apache.org> on 2017/05/01 19:26:19 UTC

[GitHub] spark pull request #17697: [SPARK-20414][MLLIB] avoid creating only 16 reduc...

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