imback82 commented on a change in pull request #26182: [SPARK-29523][SQL] SHOW 
COLUMNS should do multi-catalog resolution.
URL: https://github.com/apache/spark/pull/26182#discussion_r340760416
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
 ##########
 @@ -1358,6 +1358,29 @@ class DataSourceV2SQLSuite
     }
   }
 
+  test("SHOW COLUMNS") {
+    val t = "testcat.ns1.ns2.tbl"
+    withTable(t) {
+      spark.sql(s"CREATE TABLE $t (id bigint, data string) USING foo")
+
+      val e1 = intercept[AnalysisException] {
+        sql(s"SHOW COLUMNS FROM $t")
+      }
+      assert(e1.message.contains(s"SHOW COLUMNS is only supported with v1 
tables."))
+
+      val e2 = intercept[AnalysisException] {
 
 Review comment:
   You can do:
   ```scala
   testV1Command("SHOW COLUMNS", s"FROM $t")
   testV1Command("SHOW COLUMNS", s"IN $t")
   ```
   

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to