Skip to content

Commit

Permalink
Add an extra column which isn't part of the sort
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jun 18, 2015
1 parent ae1896b commit 84214be
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -24,18 +24,18 @@ class SortSuite extends SparkPlanTest {
test("basic sorting using ExternalSort") {

val input = Seq(
("Hello", 4),
("Hello", 1),
("World", 8)
("Hello", 4, 2.0),
("Hello", 1, 1.0),
("World", 8, 3.0)
)

checkAnswer(
input.toDF("a", "b"),
input.toDF("a", "b", "c"),
ExternalSort('a.asc :: 'b.asc :: Nil, global = false, _: SparkPlan),
input.sorted)

checkAnswer(
input.toDF("a", "b"),
input.toDF("a", "b", "c"),
ExternalSort('b.asc :: 'a.asc :: Nil, global = false, _: SparkPlan),
input.sortBy(t => (t._2, t._1)))
}
Expand Down

0 comments on commit 84214be

Please sign in to comment.