Skip to content

Commit

Permalink
Manually bind references
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jun 18, 2015
1 parent 996332a commit c60a44d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package org.apache.spark.sql.execution

import org.apache.spark.sql.catalyst.dsl.expressions._
import org.apache.spark.sql.catalyst.expressions.{Ascending, SortOrder}
import org.apache.spark.sql.catalyst.expressions.{BoundReference, Ascending, SortOrder}
import org.apache.spark.sql.types.{IntegerType, StringType}

class SortSuite extends SparkPlanTest {

Expand All @@ -31,8 +31,8 @@ class SortSuite extends SparkPlanTest {
)

val sortOrder = Seq(
SortOrder('_1, Ascending),
SortOrder('_2, Ascending)
SortOrder(BoundReference(0, StringType, nullable = false), Ascending),
SortOrder(BoundReference(1, IntegerType, nullable = false), Ascending)
)

checkAnswer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SparkPlanTest extends SparkFunSuite {
planFunction: SparkPlan => SparkPlan,
expectedAnswer: Seq[A]): Unit = {
val inputDf = TestSQLContext.createDataFrame(input)
val expectedRows = expectedAnswer.map(t => Row.apply(t))
val expectedRows = expectedAnswer.map(Row.fromTuple)
SparkPlanTest.checkAnswer(inputDf, planFunction, expectedRows) match {
case Some(errorMessage) => fail(errorMessage)
case None =>
Expand Down

0 comments on commit c60a44d

Please sign in to comment.