You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/07 02:06:22 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #26788: [SPARK-30159][SQL][TESTS] Fix the method calls of `QueryTest.checkAnswer`

HyukjinKwon commented on a change in pull request #26788: [SPARK-30159][SQL][TESTS] Fix the method calls of `QueryTest.checkAnswer`
URL: https://github.com/apache/spark/pull/26788#discussion_r355091987
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala
 ##########
 @@ -235,7 +234,21 @@ abstract class QueryTest extends PlanTest {
   }
 }
 
-object QueryTest {
+object QueryTest extends Assertions {
+  /**
+   * Runs the plan and makes sure the answer matches the expected result.
+   *
+   * @param df the [[DataFrame]] to be executed
+   * @param expectedAnswer the expected result in a [[Seq]] of [[Row]]s.
+   * @param checkToRDD whether to verify deserialization to an RDD. This runs the query twice.
+   */
+  def checkAnswer(df: DataFrame, expectedAnswer: Seq[Row], checkToRDD: Boolean = true): Unit = {
 
 Review comment:
   We can make it `private` if this isn't supposed to be called in the tests directly. companion class still can access.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org