yaooqinn commented on a change in pull request #32931:
URL: https://github.com/apache/spark/pull/32931#discussion_r656940949
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -1961,12 +1961,98 @@ class DataSourceV2SQLSuite
}
}
- test("SHOW CREATE TABLE") {
+ test("SHOW CREATE TABLE AS SERDE") {
val t = "testcat.ns1.ns2.tbl"
withTable(t) {
spark.sql(s"CREATE TABLE $t (id bigint, data string) USING foo")
- testNotSupportedV2Command("SHOW CREATE TABLE", t)
- testNotSupportedV2Command("SHOW CREATE TABLE", s"$t AS SERDE")
+ val e = intercept[AnalysisException] {
+ sql(s"SHOW CREATE TABLE $t AS SERDE")
+ }
+ assert(e.message.contains(s"SHOW CREATE TABLE AS SERDE is not supported
for v2 tables."))
+ }
+ }
+
+ test("SPARK-33898: SHOW CREATE TABLE") {
+ val t = "testcat.ns1.ns2.tbl"
+ withTable(t) {
+ spark.sql( s"""CREATE TABLE $t (
Review comment:
rm the spaces between ( and s
--
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]