Skip to content
Snippets Groups Projects
Commit 21df6ffc authored by Patrick Wendell's avatar Patrick Wendell
Browse files

SPARK-696: sortByKey should use 'ascending' parameter

parent b1d80991
No related branches found
No related tags found
No related merge requests found
...@@ -452,7 +452,7 @@ class JavaPairRDD[K, V](val rdd: RDD[(K, V)])(implicit val kManifest: ClassManif ...@@ -452,7 +452,7 @@ class JavaPairRDD[K, V](val rdd: RDD[(K, V)])(implicit val kManifest: ClassManif
*/ */
def sortByKey(ascending: Boolean): JavaPairRDD[K, V] = { def sortByKey(ascending: Boolean): JavaPairRDD[K, V] = {
val comp = com.google.common.collect.Ordering.natural().asInstanceOf[Comparator[K]] val comp = com.google.common.collect.Ordering.natural().asInstanceOf[Comparator[K]]
sortByKey(comp, true) sortByKey(comp, ascending)
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment