maropu 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_r375097596
########## 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: nit: remove this unnecessary 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: 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