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/02/07 02:19:46 UTC

[GitHub] [spark] beliefer opened a new pull request #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

beliefer opened a new pull request #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481
 
 
   ### What changes were proposed in this pull request?
   Although Spark SQL support bracketed comments, but `SQLQueryTestSuite` can't treat bracketed comments well and lead to generated golden files can't display bracketed comments well.
   This PR will improve the treatment of bracketed comments and add three test case in `PlanParserSuite`.
   Spark SQL can't support nested bracketed comments and I will open another PR to support it.
   
   
   ### Why are the changes needed?
   Golden files can't display well.
   
   
   ### Does this PR introduce any user-facing change?
   No
   
   
   ### How was this patch tested?
   New UT.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583258892
 
 
   **[Test build #118007 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118007/testReport)** for PR 27481 at commit [`2f3a54c`](https://github.com/apache/spark/commit/2f3a54cab65ca05cfd1a1b3dc458c5a987b9a28f).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584698172
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r377960449
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -262,12 +264,36 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
     }.flatten
 
     // List of SQL queries to run
-    // note: this is not a robust way to split queries using semicolon, but works for now.
-    val queries = (importedCode ++ code).mkString("\n").split("(?<=[^\\\\]);")
 
 Review comment:
   Plz update how-to-use it in the top? https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala#L66-L77

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584969929
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584972471
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585601517
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118340/
   Test FAILed.

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378192362
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,37 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val tempQueries = if (code.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- code) {
+        if (c.trim.startsWith("--QUERY-DELIMITER-START")) {
+          start = true
+          querys ++= otherCodes.toSeq.mkString("\n").split("(?<=[^\\\\]);")
+          otherCodes.clear()
+        } else if (c.trim.startsWith("--QUERY-DELIMITER-END")) {
+          start = false
+          if (tempStr.endsWith(";")) {
+            tempStr = tempStr.substring(0, tempStr.length - 1)
+          }
+          querys += s"\n$tempStr"
 
 Review comment:
   this can be `querys += s"\n${tempStr.stripSuffix(";")}"`

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


[GitHub] [spark] cloud-fan commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585770854
 
 
   thanks, merging to master/3.0!

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584843516
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118252/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585310983
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118298/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584694215
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23009/
   Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585733714
 
 
   **[Test build #118342 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118342/testReport)** for PR 27481 at commit [`900cc73`](https://github.com/apache/spark/commit/900cc733397cad9eeeba4a65c016fc5f5008ac33).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584693528
 
 
   **[Test build #118250 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118250/testReport)** for PR 27481 at commit [`4619ac7`](https://github.com/apache/spark/commit/4619ac774ab78c129316da8754a8114a6821dc24).

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583204150
 
 
   **[Test build #118007 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118007/testReport)** for PR 27481 at commit [`2f3a54c`](https://github.com/apache/spark/commit/2f3a54cab65ca05cfd1a1b3dc458c5a987b9a28f).

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


[GitHub] [spark] cloud-fan closed pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481
 
 
   

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584701583
 
 
   **[Test build #118252 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118252/testReport)** for PR 27481 at commit [`7f21b1b`](https://github.com/apache/spark/commit/7f21b1b9188000b7ff6daa1e17595bb40d690913).

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585602201
 
 
   **[Test build #118342 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118342/testReport)** for PR 27481 at commit [`900cc73`](https://github.com/apache/spark/commit/900cc733397cad9eeeba4a65c016fc5f5008ac33).

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585602746
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585734633
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118342/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585563094
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118330/
   Test PASSed.

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378611387
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,41 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val allCode = importedCode ++ code
+    val tempQueries = if (allCode.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for nested comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- allCode) {
+        if (c.trim.startsWith("--QUERY-DELIMITER-START")) {
+          start = true
+          querys ++= otherCodes.toSeq.mkString("\n").split("(?<=[^\\\\]);")
 
 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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378192867
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,37 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val tempQueries = if (code.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- code) {
+        if (c.trim.startsWith("--QUERY-DELIMITER-START")) {
+          start = true
+          querys ++= otherCodes.toSeq.mkString("\n").split("(?<=[^\\\\]);")
+          otherCodes.clear()
+        } else if (c.trim.startsWith("--QUERY-DELIMITER-END")) {
+          start = false
+          if (tempStr.endsWith(";")) {
+            tempStr = tempStr.substring(0, tempStr.length - 1)
+          }
+          querys += s"\n$tempStr"
+          tempStr = ""
+        } else if (start) {
+          tempStr += s"\n$c"
+        } else {
+          otherCodes += c
+        }
+      }
+      querys.toSeq
 
 Review comment:
   After the lookp ends, it's possible that `otherCodes` is not empty. We should "flush" it.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584843507
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585183781
 
 
   **[Test build #118298 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118298/testReport)** for PR 27481 at commit [`38005e8`](https://github.com/apache/spark/commit/38005e838fc8fc4c52b6e9bd7a2f73c0e2801e86).

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585184334
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584846133
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118250/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585310983
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118298/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584694193
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585601511
 
 
   Merged build finished. Test FAILed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585183781
 
 
   **[Test build #118298 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118298/testReport)** for PR 27481 at commit [`38005e8`](https://github.com/apache/spark/commit/38005e838fc8fc4c52b6e9bd7a2f73c0e2801e86).

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584697411
 
 
   **[Test build #118251 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118251/testReport)** for PR 27481 at commit [`c743bf3`](https://github.com/apache/spark/commit/c743bf34f4b23f28b7d56cf3d10c5d63f6185b49).

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584970143
 
 
   Merged build finished. Test FAILed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585505035
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585505043
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23087/
   Test PASSed.

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r376747514
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/comments.sql
 ##########
 @@ -26,23 +26,23 @@ SELECT 'after multi-line' AS fifth;
 SELECT 'trailing' as x1; -- inside block comment
 */
 
-/* This block comment surrounds a query which itself has a block comment...
-SELECT /* embedded single line */ 'embedded' AS x2;
-*/
+-- /* This block comment surrounds a query which itself has a block comment...
+-- SELECT /* embedded single line */ 'embedded' AS x2;
+-- */
 
 
 Review comment:
   OK. I will not comment out nested comments and throw exception into golden files.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583259331
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584846120
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584970153
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118268/
   Test FAILed.

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-28880][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-28880][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r376391699
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/comments.sql
 ##########
 @@ -26,23 +26,23 @@ SELECT 'after multi-line' AS fifth;
 SELECT 'trailing' as x1; -- inside block comment
 */
 
-/* This block comment surrounds a query which itself has a block comment...
-SELECT /* embedded single line */ 'embedded' AS x2;
-*/
+-- /* This block comment surrounds a query which itself has a block comment...
+-- SELECT /* embedded single line */ 'embedded' AS x2;
+-- */
 
 
 Review comment:
   Thanks for your review. I have a question the nested bracketed comments will throw parsed exception not look good. Should I display the parsed exception into output?

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585184334
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585601419
 
 
   **[Test build #118340 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118340/testReport)** for PR 27481 at commit [`900cc73`](https://github.com/apache/spark/commit/900cc733397cad9eeeba4a65c016fc5f5008ac33).
    * This patch **fails due to an unknown error code, -9**.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584698172
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584702137
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23011/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583259340
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118007/
   Test PASSed.

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378221544
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,37 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val tempQueries = if (code.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- code) {
+        if (c.trim.startsWith("--QUERY-DELIMITER-START")) {
+          start = true
+          querys ++= otherCodes.toSeq.mkString("\n").split("(?<=[^\\\\]);")
+          otherCodes.clear()
+        } else if (c.trim.startsWith("--QUERY-DELIMITER-END")) {
+          start = false
+          if (tempStr.endsWith(";")) {
+            tempStr = tempStr.substring(0, tempStr.length - 1)
+          }
+          querys += s"\n$tempStr"
 
 Review comment:
   OK. Good idea.

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378221338
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -62,7 +64,12 @@ import org.apache.spark.tags.ExtendedSQLTest
  * }}}
  *
  * The format for input files is simple:
- *  1. A list of SQL queries separated by semicolon.
+ *  1. A list of SQL queries separated by semicolons by default. If the semicolon cannot effectively
+ *     separate the SQL queries in the test file(e.g. bracketed comments), please use
+ *     --QUERY-DELIMITER-START and --QUERY-DELIMITER-END. Lines starting with
+ *     --QUERY-DELIMITER-START and --QUERY-DELIMITER-END represent the beginning and end of a query,
+ *     respectively. Code that is not surrounded by lines that begin with --QUERY-DELIMITER-START
+ *     and --QUERY-DELIMITER-END is still separated by semicolons.
 
 Review comment:
   Thanks!

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584842042
 
 
   **[Test build #118251 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118251/testReport)** for PR 27481 at commit [`c743bf3`](https://github.com/apache/spark/commit/c743bf34f4b23f28b7d56cf3d10c5d63f6185b49).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585602754
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23099/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585602754
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23099/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583204492
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585505035
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583259331
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] maropu commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
maropu commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585477887
 
 
   Looks fine to me except for the existing @cloud-fan comments.

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584697411
 
 
   **[Test build #118251 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118251/testReport)** for PR 27481 at commit [`c743bf3`](https://github.com/apache/spark/commit/c743bf34f4b23f28b7d56cf3d10c5d63f6185b49).

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585562489
 
 
   **[Test build #118330 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118330/testReport)** for PR 27481 at commit [`fa8397e`](https://github.com/apache/spark/commit/fa8397e439e141f95df728564d2e3bae1641f313).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584702124
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585309984
 
 
   **[Test build #118298 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118298/testReport)** for PR 27481 at commit [`38005e8`](https://github.com/apache/spark/commit/38005e838fc8fc4c52b6e9bd7a2f73c0e2801e86).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583259340
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118007/
   Test PASSed.

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378596620
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,41 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val allCode = importedCode ++ code
+    val tempQueries = if (allCode.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for nested comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- allCode) {
+        if (c.trim.startsWith("--QUERY-DELIMITER-START")) {
+          start = true
+          querys ++= otherCodes.toSeq.mkString("\n").split("(?<=[^\\\\]);")
+          otherCodes.clear()
+        } else if (c.trim.startsWith("--QUERY-DELIMITER-END")) {
+          start = false
+//          if (tempStr.endsWith(";")) {
+//            tempStr = tempStr.substring(0, tempStr.length - 1)
+//          }
 
 Review comment:
   Oh, I forgot it.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585310968
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583204499
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22772/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585581864
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23097/
   Test PASSed.

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r377058133
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -262,12 +264,36 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
     }.flatten
 
     // List of SQL queries to run
-    // note: this is not a robust way to split queries using semicolon, but works for now.
-    val queries = (importedCode ++ code).mkString("\n").split("(?<=[^\\\\]);")
 
 Review comment:
   I think we should use stronger delimiter that is not ambiguous. e.g. a line of `--QUERY-DELIMITER`. When we detect that a test file contains `--QUERY-DELIMITER`, we use it to split queries instead of semicolon.

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


[GitHub] [spark] maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r377963914
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -262,12 +264,36 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
     }.flatten
 
     // List of SQL queries to run
-    // note: this is not a robust way to split queries using semicolon, but works for now.
-    val queries = (importedCode ++ code).mkString("\n").split("(?<=[^\\\\]);")
 
 Review comment:
   Based on the @cloud-fan suggestion, I thought it like this;
   ```
   --QUERY-DELIMITER ':'
   some test query:
   some test query:
   ...
   --QUERY-DELIMITER ';'
   ```
   I think It is hard to see what's a delimiter now from the name `--QUERY-DELIMITER-START`. Or, any concern?

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


[GitHub] [spark] beliefer commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585601774
 
 
   retest this please

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


[GitHub] [spark] maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378579042
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,41 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val allCode = importedCode ++ code
+    val tempQueries = if (allCode.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for nested comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- allCode) {
+        if (c.trim.startsWith("--QUERY-DELIMITER-START")) {
+          start = true
+          querys ++= otherCodes.toSeq.mkString("\n").split("(?<=[^\\\\]);")
 
 Review comment:
   +1

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585053387
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118269/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584842816
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585602746
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584842816
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585563094
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118330/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584698191
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23010/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584698191
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23010/
   Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585581491
 
 
   **[Test build #118340 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118340/testReport)** for PR 27481 at commit [`900cc73`](https://github.com/apache/spark/commit/900cc733397cad9eeeba4a65c016fc5f5008ac33).

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585053387
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118269/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585581864
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23097/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585563087
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378341651
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,41 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val allCode = importedCode ++ code
+    val tempQueries = if (allCode.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for nested comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- allCode) {
+        if (c.trim.startsWith("--QUERY-DELIMITER-START")) {
+          start = true
+          querys ++= otherCodes.toSeq.mkString("\n").split("(?<=[^\\\\]);")
+          otherCodes.clear()
+        } else if (c.trim.startsWith("--QUERY-DELIMITER-END")) {
+          start = false
+//          if (tempStr.endsWith(";")) {
+//            tempStr = tempStr.substring(0, tempStr.length - 1)
+//          }
 
 Review comment:
   let's remove it.

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r377983560
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -262,12 +264,36 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
     }.flatten
 
     // List of SQL queries to run
-    // note: this is not a robust way to split queries using semicolon, but works for now.
-    val queries = (importedCode ++ code).mkString("\n").split("(?<=[^\\\\]);")
 
 Review comment:
   Because use `--QUERY-DELIMITER-START` and `--QUERY-DELIMITER-END` can make code easier. Because SQL and comments could contains ':' or ';', so use ':' or ';' can't works well.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585053372
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] beliefer commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585800590
 
 
   @cloud-fan @maropu @gatorsmile @dongjoon-hyun Thanks for everyone's work.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584843516
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118252/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585734629
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r376746662
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/comments.sql
 ##########
 @@ -26,23 +26,23 @@ SELECT 'after multi-line' AS fifth;
 SELECT 'trailing' as x1; -- inside block comment
 */
 
-/* This block comment surrounds a query which itself has a block comment...
-SELECT /* embedded single line */ 'embedded' AS x2;
-*/
+-- /* This block comment surrounds a query which itself has a block comment...
+-- SELECT /* embedded single line */ 'embedded' AS x2;
+-- */
 
 
 Review comment:
   We need this change to comment out these tests in branch-3.0? If branch-3.0 doesn't support these nested comments,  its better to fix them so that the test could throw an exception for nested comments here?

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584969929
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584972471
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585310968
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584972478
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23028/
   Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585504683
 
 
   **[Test build #118330 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118330/testReport)** for PR 27481 at commit [`fa8397e`](https://github.com/apache/spark/commit/fa8397e439e141f95df728564d2e3bae1641f313).

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


[GitHub] [spark] maropu commented on a change in pull request #27481: [SPARK-28880][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #27481: [SPARK-28880][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r376388844
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/comments.sql
 ##########
 @@ -26,23 +26,23 @@ SELECT 'after multi-line' AS fifth;
 SELECT 'trailing' as x1; -- inside block comment
 */
 
-/* This block comment surrounds a query which itself has a block comment...
-SELECT /* embedded single line */ 'embedded' AS x2;
-*/
+-- /* This block comment surrounds a query which itself has a block comment...
+-- SELECT /* embedded single line */ 'embedded' AS x2;
+-- */
 
 
 Review comment:
   > Spark SQL can't support nested bracketed comments and I will open another PR to support it.
   
   We need to update this file in this PR?  If you will work on that, I think its ok to update this file in the next one.

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378341514
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,41 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val allCode = importedCode ++ code
+    val tempQueries = if (allCode.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for nested comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- allCode) {
+        if (c.trim.startsWith("--QUERY-DELIMITER-START")) {
+          start = true
+          querys ++= otherCodes.toSeq.mkString("\n").split("(?<=[^\\\\]);")
 
 Review comment:
   This (`toSeq.mkString("\n").split("(?<=[^\\\\]);")`) appears 3 times, maybe create a function for it?

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378221686
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,37 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val tempQueries = if (code.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- code) {
+        if (c.trim.startsWith("--QUERY-DELIMITER-START")) {
+          start = true
+          querys ++= otherCodes.toSeq.mkString("\n").split("(?<=[^\\\\]);")
+          otherCodes.clear()
+        } else if (c.trim.startsWith("--QUERY-DELIMITER-END")) {
+          start = false
+          if (tempStr.endsWith(";")) {
+            tempStr = tempStr.substring(0, tempStr.length - 1)
+          }
+          querys += s"\n$tempStr"
+          tempStr = ""
+        } else if (start) {
+          tempStr += s"\n$c"
+        } else {
+          otherCodes += c
+        }
+      }
+      querys.toSeq
 
 Review comment:
   OK. I forgot it.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585734629
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584842832
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118251/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585505043
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23087/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584969938
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23027/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585184346
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23056/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583204499
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22772/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584846120
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] beliefer commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584970179
 
 
   Pending Jenkins.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584842832
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118251/
   Test PASSed.

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


[GitHub] [spark] gatorsmile commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
gatorsmile commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r376745633
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/comments.sql
 ##########
 @@ -26,23 +26,23 @@ SELECT 'after multi-line' AS fifth;
 SELECT 'trailing' as x1; -- inside block comment
 */
 
-/* This block comment surrounds a query which itself has a block comment...
-SELECT /* embedded single line */ 'embedded' AS x2;
-*/
+-- /* This block comment surrounds a query which itself has a block comment...
+-- SELECT /* embedded single line */ 'embedded' AS x2;
+-- */
 
 
 Review comment:
   @maropu I think we can fix the test cases in 3.0. Regarding https://github.com/apache/spark/pull/27495, it is an enhancement, we can merge it to master only. 

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584972478
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23028/
   Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584845268
 
 
   **[Test build #118250 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118250/testReport)** for PR 27481 at commit [`4619ac7`](https://github.com/apache/spark/commit/4619ac774ab78c129316da8754a8114a6821dc24).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584702124
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378189827
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,37 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val tempQueries = if (code.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- code) {
 
 Review comment:
   `code` -> `importedCode ++ code`? The imported code may also have `--QUERY-DELIMITER-START`

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584843507
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r377065624
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -262,12 +264,36 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
     }.flatten
 
     // List of SQL queries to run
-    // note: this is not a robust way to split queries using semicolon, but works for now.
-    val queries = (importedCode ++ code).mkString("\n").split("(?<=[^\\\\]);")
 
 Review comment:
   OK. A better method. I will try on this way!

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585601517
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118340/
   Test FAILed.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584846133
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118250/
   Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585581857
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] beliefer removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584970179
 
 
   Pending Jenkins.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584970143
 
 
   Merged build finished. Test FAILed.

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


[GitHub] [spark] maropu commented on a change in pull request #27481: [SPARK-28880][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #27481: [SPARK-28880][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r376395756
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/comments.sql
 ##########
 @@ -26,23 +26,23 @@ SELECT 'after multi-line' AS fifth;
 SELECT 'trailing' as x1; -- inside block comment
 */
 
-/* This block comment surrounds a query which itself has a block comment...
-SELECT /* embedded single line */ 'embedded' AS x2;
-*/
+-- /* This block comment surrounds a query which itself has a block comment...
+-- SELECT /* embedded single line */ 'embedded' AS x2;
+-- */
 
 
 Review comment:
   Yea, I think better error messages look good if we can fix it easily.

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585602201
 
 
   **[Test build #118342 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118342/testReport)** for PR 27481 at commit [`900cc73`](https://github.com/apache/spark/commit/900cc733397cad9eeeba4a65c016fc5f5008ac33).

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584969938
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23027/
   Test PASSed.

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584971977
 
 
   **[Test build #118269 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118269/testReport)** for PR 27481 at commit [`a512664`](https://github.com/apache/spark/commit/a5126643a958d3aacfee994a9491e851506bdf54).

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585053372
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584970135
 
 
   **[Test build #118268 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118268/testReport)** for PR 27481 at commit [`5a70f00`](https://github.com/apache/spark/commit/5a70f007d0f0c1ae0d98321b816b14d3adeaeb92).
    * This patch **fails Scala style tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584694193
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584702137
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23011/
   Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585052803
 
 
   **[Test build #118269 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118269/testReport)** for PR 27481 at commit [`a512664`](https://github.com/apache/spark/commit/a5126643a958d3aacfee994a9491e851506bdf54).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584970153
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118268/
   Test FAILed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584701583
 
 
   **[Test build #118252 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118252/testReport)** for PR 27481 at commit [`7f21b1b`](https://github.com/apache/spark/commit/7f21b1b9188000b7ff6daa1e17595bb40d690913).

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584693528
 
 
   **[Test build #118250 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118250/testReport)** for PR 27481 at commit [`4619ac7`](https://github.com/apache/spark/commit/4619ac774ab78c129316da8754a8114a6821dc24).

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378208860
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -261,10 +271,37 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
       }
     }.flatten
 
+    val tempQueries = if (code.exists(_.trim.startsWith("--QUERY-DELIMITER"))) {
+      // Although the loop is heavy, only used for comments test.
+      val querys = new ArrayBuffer[String]
+      val otherCodes = new ArrayBuffer[String]
+      var tempStr = ""
+      var start = false
+      for (c <- code) {
 
 Review comment:
   OK. Thanks for your remind.

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585581491
 
 
   **[Test build #118340 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118340/testReport)** for PR 27481 at commit [`900cc73`](https://github.com/apache/spark/commit/900cc733397cad9eeeba4a65c016fc5f5008ac33).

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


[GitHub] [spark] maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r376746662
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/comments.sql
 ##########
 @@ -26,23 +26,23 @@ SELECT 'after multi-line' AS fifth;
 SELECT 'trailing' as x1; -- inside block comment
 */
 
-/* This block comment surrounds a query which itself has a block comment...
-SELECT /* embedded single line */ 'embedded' AS x2;
-*/
+-- /* This block comment surrounds a query which itself has a block comment...
+-- SELECT /* embedded single line */ 'embedded' AS x2;
+-- */
 
 
 Review comment:
   We need this change to comment out these tests in branch-3.0? If branch-3.0 doesn't support these nested comments,  its better to fix them so that the test could throw an exception for nested comments here instead of just commenting out them?

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585581857
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r378188193
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -62,7 +64,12 @@ import org.apache.spark.tags.ExtendedSQLTest
  * }}}
  *
  * The format for input files is simple:
- *  1. A list of SQL queries separated by semicolon.
+ *  1. A list of SQL queries separated by semicolons by default. If the semicolon cannot effectively
+ *     separate the SQL queries in the test file(e.g. bracketed comments), please use
+ *     --QUERY-DELIMITER-START and --QUERY-DELIMITER-END. Lines starting with
+ *     --QUERY-DELIMITER-START and --QUERY-DELIMITER-END represent the beginning and end of a query,
+ *     respectively. Code that is not surrounded by lines that begin with --QUERY-DELIMITER-START
+ *     and --QUERY-DELIMITER-END is still separated by semicolons.
 
 Review comment:
   This is better than my original idea. We only need to use this special delimiter for queries that need it. Good job!

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585504683
 
 
   **[Test build #118330 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118330/testReport)** for PR 27481 at commit [`fa8397e`](https://github.com/apache/spark/commit/fa8397e439e141f95df728564d2e3bae1641f313).

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585734633
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118342/
   Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584971977
 
 
   **[Test build #118269 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118269/testReport)** for PR 27481 at commit [`a512664`](https://github.com/apache/spark/commit/a5126643a958d3aacfee994a9491e851506bdf54).

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583204492
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-28880][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-28880][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r376400521
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/comments.sql
 ##########
 @@ -26,23 +26,23 @@ SELECT 'after multi-line' AS fifth;
 SELECT 'trailing' as x1; -- inside block comment
 */
 
-/* This block comment surrounds a query which itself has a block comment...
-SELECT /* embedded single line */ 'embedded' AS x2;
-*/
+-- /* This block comment surrounds a query which itself has a block comment...
+-- SELECT /* embedded single line */ 'embedded' AS x2;
+-- */
 
 
 Review comment:
   It won't be easy for the time being. So I want comment out temporarily.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585184346
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23056/
   Test PASSed.

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


[GitHub] [spark] maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r377964076
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/results/postgreSQL/comments.sql.out
 ##########
 @@ -36,129 +36,32 @@ before multi-line
 
 -- !query
 /* This is an example of SQL which should not execute:
- * select 'multi-line'
--- !query schema
-struct<>
--- !query output
-org.apache.spark.sql.catalyst.parser.ParseException
-
-mismatched input '/' expecting {'(', 'ADD', 'ALTER', 'ANALYZE', 'CACHE', 'CLEAR', 'COMMENT', 'COMMIT', 'CREATE', 'DELETE', 'DESC', 'DESCRIBE', 'DFS', 'DROP', 'EXPLAIN', 'EXPORT', 'FROM', 'GRANT', 'IMPORT', 'INSERT', 'LIST', 'LOAD', 'LOCK', 'MAP', 'MERGE', 'MSCK', 'REDUCE', 'REFRESH', 'REPLACE', 'RESET', 'REVOKE', 'ROLLBACK', 'SELECT', 'SET', 'SHOW', 'START', 'TABLE', 'TRUNCATE', 'UNCACHE', 'UNLOCK', 'UPDATE', 'USE', 'VALUES', 'WITH'}(line 1, pos 0)
-
-== SQL ==
-/* This is an example of SQL which should not execute:
-^^^
- * select 'multi-line'
-
-
--- !query
-*/
+ * select 'multi-line';
+ */
 SELECT 'after multi-line' AS fifth
 
 Review comment:
   Oh, the output is pretty nice.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584842606
 
 
   **[Test build #118252 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118252/testReport)** for PR 27481 at commit [`7f21b1b`](https://github.com/apache/spark/commit/7f21b1b9188000b7ff6daa1e17595bb40d690913).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584694215
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23009/
   Test PASSed.

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584969466
 
 
   **[Test build #118268 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118268/testReport)** for PR 27481 at commit [`5a70f00`](https://github.com/apache/spark/commit/5a70f007d0f0c1ae0d98321b816b14d3adeaeb92).

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585563087
 
 
   Merged build finished. Test PASSed.

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


[GitHub] [spark] SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-584969466
 
 
   **[Test build #118268 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118268/testReport)** for PR 27481 at commit [`5a70f00`](https://github.com/apache/spark/commit/5a70f007d0f0c1ae0d98321b816b14d3adeaeb92).

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


[GitHub] [spark] beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
beliefer commented on a change in pull request #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#discussion_r377984203
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -262,12 +264,36 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
     }.flatten
 
     // List of SQL queries to run
-    // note: this is not a robust way to split queries using semicolon, but works for now.
-    val queries = (importedCode ++ code).mkString("\n").split("(?<=[^\\\\]);")
 
 Review comment:
   I will update how to use it in the top of `SQLQueryTestSuite`.

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


[GitHub] [spark] AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27481: [SPARK-30758][SQL][TESTS] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-585601511
 
 
   Merged build finished. Test FAILed.

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


[GitHub] [spark] SparkQA removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27481: [SPARK-28880][SQL] Improve bracketed comments tests.
URL: https://github.com/apache/spark/pull/27481#issuecomment-583204150
 
 
   **[Test build #118007 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118007/testReport)** for PR 27481 at commit [`2f3a54c`](https://github.com/apache/spark/commit/2f3a54cab65ca05cfd1a1b3dc458c5a987b9a28f).

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