HyukjinKwon commented on a change in pull request #31245:
URL: https://github.com/apache/spark/pull/31245#discussion_r572020314



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala
##########
@@ -119,6 +101,32 @@ trait ShowTablesSuiteBase extends 
command.ShowTablesSuiteBase {
       assert(errMsg.contains("Database from v1 session catalog is not 
specified"))
     }
   }
+
+  test("SPARK-34157 Unify output of SHOW TABLES and pass output attributes 
properly") {
+    withNamespace(s"$catalog.ns") {
+      sql(s"CREATE NAMESPACE $catalog.ns")
+      sql(s"USE $catalog.ns")
+      withTable("tbl") {
+        sql("CREATE TABLE tbl(col1 int, col2 string) USING parquet")
+        checkAnswer(sql("show tables"), Row("ns", "tbl", false))
+        assert(sql("show tables").schema.fieldNames.deep ==
+          Seq("namespace", "tableName", "isTemporary"))
+        assert(sql("show table extended like 'tbl'").collect()(0).length == 4)
+        assert(sql("show table extended like 'tbl'").schema.fieldNames.deep ==

Review comment:
       Seems like this broke Scala 2.13 build. I made a followup here

##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala
##########
@@ -119,6 +101,32 @@ trait ShowTablesSuiteBase extends 
command.ShowTablesSuiteBase {
       assert(errMsg.contains("Database from v1 session catalog is not 
specified"))
     }
   }
+
+  test("SPARK-34157 Unify output of SHOW TABLES and pass output attributes 
properly") {
+    withNamespace(s"$catalog.ns") {
+      sql(s"CREATE NAMESPACE $catalog.ns")
+      sql(s"USE $catalog.ns")
+      withTable("tbl") {
+        sql("CREATE TABLE tbl(col1 int, col2 string) USING parquet")
+        checkAnswer(sql("show tables"), Row("ns", "tbl", false))
+        assert(sql("show tables").schema.fieldNames.deep ==
+          Seq("namespace", "tableName", "isTemporary"))
+        assert(sql("show table extended like 'tbl'").collect()(0).length == 4)
+        assert(sql("show table extended like 'tbl'").schema.fieldNames.deep ==

Review comment:
       Seems like this broke Scala 2.13 build. I made a followup here 
https://github.com/apache/spark/pull/31526




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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to