Skip to content
Snippets Groups Projects
Commit bfeed472 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Merge pull request #465 from pwendell/java-sort-fix

SPARK-696: sortByKey should use 'ascending' parameter
parents 582d31df 21df6ffc
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
*/
def sortByKey(ascending: Boolean): JavaPairRDD[K, V] = {
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