Skip to content

Commit

Permalink
Add types so that tests compile
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jun 18, 2015
1 parent a46144a commit 996332a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Expand Up @@ -37,7 +37,7 @@ class SortSuite extends SparkPlanTest {

checkAnswer(
input,
child => new ExternalSort(sortOrder, global = false, child),
(child: SparkPlan) => new ExternalSort(sortOrder, global = false, child),
input.sorted
)

Expand Down
Expand Up @@ -26,16 +26,16 @@ import org.apache.spark.sql.{Row, DataFrame}
import org.apache.spark.sql.catalyst.util._

/**
* Base class for writing tests for individual physical operators. For an example of how this class
* can be used, see [[SortSuite]].
* Base class for writing tests for individual physical operators. For an example of how this
* class's test helper methods can be used, see [[SortSuite]].
*/
class SparkPlanTest extends SparkFunSuite {

/**
* Runs the plan and makes sure the answer matches the expected result.
* @param input the input data to be used.
* @param planFunction a function which accepts the input SparkPlan and uses it to instantiate the
* physical operator that's being tested.
* @param planFunction a function which accepts the input SparkPlan and uses it to instantiate
* the physical operator that's being tested.
* @param expectedAnswer the expected result in a [[Seq]] of [[Row]]s.
*/
protected def checkAnswer(
Expand All @@ -51,8 +51,8 @@ class SparkPlanTest extends SparkFunSuite {
/**
* Runs the plan and makes sure the answer matches the expected result.
* @param input the input data to be used.
* @param planFunction a function which accepts the input SparkPlan and uses it to instantiate the
* physical operator that's being tested.
* @param planFunction a function which accepts the input SparkPlan and uses it to instantiate
* the physical operator that's being tested.
* @param expectedAnswer the expected result in a [[Seq]] of [[Product]]s.
*/
protected def checkAnswer[A <: Product : TypeTag](
Expand All @@ -76,8 +76,8 @@ object SparkPlanTest {
/**
* Runs the plan and makes sure the answer matches the expected result.
* @param input the input data to be used.
* @param planFunction a function which accepts the input SparkPlan and uses it to instantiate the
* physical operator that's being tested.
* @param planFunction a function which accepts the input SparkPlan and uses it to instantiate
* the physical operator that's being tested.
* @param expectedAnswer the expected result in a [[Seq]] of [[Row]]s.
*/
def checkAnswer(
Expand Down

0 comments on commit 996332a

Please sign in to comment.