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/06 14:13:44 UTC

[GitHub] [spark] javierivanov commented on a change in pull request #27321: [SPARK-30049][SQL] SQL fails to parse when comment contains an unmatched quote character.

javierivanov commented on a change in pull request #27321: [SPARK-30049][SQL] SQL fails to parse when comment contains an unmatched quote character.
URL: https://github.com/apache/spark/pull/27321#discussion_r375855965
 
 

 ##########
 File path: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
 ##########
 @@ -400,4 +400,21 @@ class CliSuite extends SparkFunSuite with BeforeAndAfterAll with Logging {
         -> "1.000000000000000000"
     )
   }
+
+  test("SPARK-30049 Should not complaint for quotes in commented lines") {
+    runCliWithin(1.minute)(
+      """SELECT concat('test', 'comment') -- someone's comment here
+        |;""".stripMargin -> "testcomment"
+    )
+  }
+
+  test("SPARK-30049 Should not complaint 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"
+    )
+  }
+
 
 Review comment:
   @maropu Not sure, which blank? 

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