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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org