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 2022/11/03 08:53:56 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #34815: [SPARK-37555][SQL] spark-sql should pass last unclosed comment to backend

MaxGekk commented on code in PR #34815:
URL: https://github.com/apache/spark/pull/34815#discussion_r1012632355


##########
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala:
##########
@@ -620,4 +620,17 @@ class CliSuite extends SparkFunSuite with BeforeAndAfterAll with Logging {
         |""".stripMargin -> "SELECT 1"
     )
   }
+
+  test("SPARK-37555: spark-sql should pass last unclosed comment to backend") {

Review Comment:
   It fails on my PRs periodically too. For instance, see https://github.com/MaxGekk/spark/actions/runs/3383705774/jobs/5619867814:
   ```
   [info] - SPARK-37555: spark-sql should pass last unclosed comment to backend *** FAILED *** (2 minutes, 8 seconds)
   [info]   =======================
   [info]   CliSuite failure output
   [info]   =======================
   [info]   Spark SQL CLI command line: ../../bin/spark-sql --master local --driver-java-options -Dderby.system.durability=test --conf spark.ui.enabled=false --hiveconf javax.jdo.option.ConnectionURL=jdbc:derby:;databaseName=/home/runner/work/spark/spark/target/tmp/spark-16a98152-adaa-4653-93d1-82425ddc6ed5;create=true --hiveconf hive.exec.scratchdir=/home/runner/work/spark/spark/target/tmp/spark-d3ccd810-41f0-4a29-9592-f8c08ad7f50a --hiveconf conf1=conftest --hiveconf conf2=1 --hiveconf hive.metastore.warehouse.dir=/home/runner/work/spark/spark/target/tmp/spark-c80a8015-a17d-422d-aeff-11be2a4b9986
   [info]   Exception: java.util.concurrent.TimeoutException: Futures timed out after [2 minutes]
   [info]   Failed to capture next expected output "Unclosed bracketed comment" within 2 minutes.
   [info]   
   [info]   2022-11-03 01:00:52.245 - stderr> Setting default log level to "WARN".
   [info]   2022-11-03 01:00:52.245 - stderr> To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
   [info]   2022-11-03 01:00:59.101 - stderr> Spark master: local, Application Id: local-1667462453894
   [info]   2022-11-03 01:00:59.939 - stdout> spark-sql> /* SELECT /*+ HINT() 4; */;
   [info]   2022-11-03 01:01:00.378 - stderr> 
   [info]   2022-11-03 01:01:00.379 - stderr> [PARSE_SYNTAX_ERROR] Syntax error at or near ';'(line 1, pos 26)
   [info]   2022-11-03 01:01:00.379 - stderr> 
   [info]   2022-11-03 01:01:00.379 - stderr> == SQL ==
   [info]   2022-11-03 01:01:00.379 - stderr> /* SELECT /*+ HINT() 4; */;
   [info]   2022-11-03 01:01:00.379 - stderr> --------------------------^^^
   [info]   2022-11-03 01:01:00.379 - stderr> 
   [info]   2022-11-03 01:01:00.401 - stdout> spark-sql> /* SELECT /*+ HINT() 4; */ SELECT 1;
   [info]   2022-11-03 01:01:02.78 - stdout> 1
   [info]   2022-11-03 01:01:02.78 - stderr> Time taken: 2.384 seconds, Fetched 1 row(s)
   [info]   2022-11-03 01:01:02.791 - stderr> 
   [info]   2022-11-03 01:01:02.791 - stderr> Unclosed bracketed comment(line 1, pos 0)
   [info]   2022-11-03 01:01:02.791 - stderr> 
   [info]   2022-11-03 01:01:02.791 - stderr> == SQL ==
   [info]   2022-11-03 01:01:02.791 - stderr> /* Here is a unclosed bracketed comment SELECT 1;
   [info]   2022-11-03 01:01:02.791 - stderr> ^^^
   [info]   2022-11-03 01:01:02.791 - stdout> spark-sql> /* Here is a unclosed bracketed comment SELECT 1;
   [info]   2022-11-03 01:01:02.792 - stderr> 
   [info]   2022-11-03 01:01:02.795 - stdout> spark-sql> /* SELECT /*+ HINT() */ 4; */;
   [info]   2022-11-03 01:01:02.995 - stdout> spark-sql> 
   [info]   ===========================
   [info]   End CliSuite failure output
   [info]   =========================== (CliSuite.scala:213)
   [info]   org.scalatest.exceptions.TestFailedException:
   [info]   at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
   ```
   Maybe we don't wait for 2 minutes in real life.



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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