File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
main/scala/org/apache/spark/sql
test/scala/org/apache/spark/sql Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -609,7 +609,7 @@ class DataFrame private[sql](
609
609
*/
610
610
@ scala.annotation.varargs
611
611
def sortWithinPartitions (sortCol : String , sortCols : String * ): DataFrame = {
612
- sortWithinPartitions(sortCol, sortCols : _* )
612
+ sortWithinPartitions(( sortCol +: sortCols).map( Column (_)) : _* )
613
613
}
614
614
615
615
/**
Original file line number Diff line number Diff line change @@ -1090,8 +1090,8 @@ class DataFrameSuite extends QueryTest with SharedSQLContext {
1090
1090
}
1091
1091
1092
1092
// Distribute into one partition and order by. This partition should contain all the values.
1093
- val df6 = data.repartition(1 , $" a" ).sortWithinPartitions($ " b" .asc )
1094
- // Walk each partition and verify that it is sorted descending and not globally sorted.
1093
+ val df6 = data.repartition(1 , $" a" ).sortWithinPartitions(" b" )
1094
+ // Walk each partition and verify that it is sorted ascending and not globally sorted.
1095
1095
df6.rdd.foreachPartition { p =>
1096
1096
var previousValue : Int = - 1
1097
1097
var allSequential : Boolean = true
You can’t perform that action at this time.
0 commit comments