maropu commented on a change in pull request #27920: [SPARK-31102][SQL] 
Spark-sql fails to parse when contains comment.
URL: https://github.com/apache/spark/pull/27920#discussion_r393456400
 
 

 ##########
 File path: 
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
 ##########
 @@ -402,24 +402,14 @@ class CliSuite extends SparkFunSuite with 
BeforeAndAfterAll with Logging {
   }
 
   test("SPARK-30049 Should not complain for quotes in commented lines") {
-    runCliWithin(1.minute)(
+    runCliWithin(3.minute)(
       """SELECT concat('test', 'comment') -- someone's comment here
         |;""".stripMargin -> "testcomment"
     )
-  }
-
-  test("SPARK-30049 Should not complain for quotes in commented with 
multi-lines") {
-    runCliWithin(1.minute)(
-      """SELECT concat('test', 'comment') -- someone's comment here \\
-        | comment continues here with single ' quote \\
-        | extra ' \\
-        |;""".stripMargin -> "testcomment"
-    )
-    runCliWithin(1.minute)(
-      """SELECT concat('test', 'comment') -- someone's comment here \\
-        |   comment continues here with single ' quote \\
-        |   extra ' \\
-        |   ;""".stripMargin -> "testcomment"
 
 Review comment:
   If we can, the fix in `SqlBase.g4` (`SIMPLE_COMENT`) looks fine to me: 
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4#L1811
 Could you try?

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


With regards,
Apache Git Services

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

Reply via email to