maropu commented on a change in pull request #28393:
URL: https://github.com/apache/spark/pull/28393#discussion_r418934684
##########
File path:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
##########
@@ -500,4 +500,13 @@ class CliSuite extends SparkFunSuite with
BeforeAndAfterAll with BeforeAndAfterE
| ;""".stripMargin -> "testcomment"
)
}
+
+ test("SPARK-31595 Should allow unescaped quote mark in quoted string") {
+ runCliWithin(1.minute)(
+ """SELECT '"legal string a';select 1 + 234;""".stripMargin -> "235"
Review comment:
Is this an only issue in the thrift server side? How about the spark
side?
```
scala> sql("""SELECT '"legal string a';select 1 + 234;""").show()
org.apache.spark.sql.catalyst.parser.ParseException:
extraneous input 'select' expecting {<EOF>, ';'}(line 1, pos 25)
== SQL ==
SELECT '"legal string a';select 1 + 234;
-------------------------^^^
at
org.apache.spark.sql.catalyst.parser.ParseException.withCommand(ParseDriver.scala:268)
at
org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:135)
at
org.apache.spark.sql.execution.SparkSqlParser.parse(SparkSqlParser.scala:49)
```
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]