maropu commented on a change in pull request #25357: [SPARK-28617][SQL][TEST] 
Completely remove comments from the golden result file
URL: https://github.com/apache/spark/pull/25357#discussion_r310876905
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -224,7 +224,8 @@ class SQLQueryTestSuite extends QueryTest with 
SharedSQLContext {
   private def runTest(testCase: TestCase): Unit = {
     val input = fileToString(new File(testCase.inputFile))
 
-    val (comments, code) = input.split("\n").partition(_.startsWith("--"))
+    val (comments, codeMaybeWithComment) = 
input.split("\n").partition(_.trim.startsWith("--"))
+    val code = codeMaybeWithComment.map(_.split("--").head)
 
 Review comment:
   oh... really weird output... nice catch.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to