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 2020/05/04 04:29:15 UTC

[GitHub] [spark] beliefer commented on a change in pull request #28430: [SPARK-31372][SQL][TEST][FOLLOW-UP] Improve ExpressionsSchemaSuite so that easy to track the diff.

beliefer commented on a change in pull request #28430:
URL: https://github.com/apache/spark/pull/28430#discussion_r419209216



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/ExpressionsSchemaSuite.scala
##########
@@ -156,14 +156,16 @@ class ExpressionsSchemaSuite extends QueryTest with SharedSparkSession {
       stringToFile(resultFile, goldenOutput)
     }
 
+    val outputSize = outputs.size
     val expectedOutputs: Seq[QueryOutput] = {
-      val goldenOutput = fileToString(resultFile)
-      val lines = goldenOutput.split("\n")
+      val expectedGoldenOutput = fileToString(resultFile)
+      val lines = expectedGoldenOutput.split("\n")
+      val expectedSize = lines.size
 
       // The header of golden file has one line, plus four lines of the summary and three
       // lines of the header of schema table.
-      assert(lines.size == outputs.size + 8,
-        s"Expected ${outputs.size + 8} blocks in result file but got ${lines.size}. " +
+      assert(expectedSize == outputSize + 8,

Review comment:
       OK.




----------------------------------------------------------------
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



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