You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/01 05:17:21 UTC

[GitHub] [spark] superdupershant commented on a change in pull request #35681: [SPARK-38350][SQL] Make the output of V1/V2 "desc extended table" consistent

superdupershant commented on a change in pull request #35681:
URL: https://github.com/apache/spark/pull/35681#discussion_r816455073



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DescribeTableExec.scala
##########
@@ -43,7 +47,9 @@ case class DescribeTableExec(
   private def addTableDetails(rows: ArrayBuffer[InternalRow]): Unit = {
     rows += emptyRow()
     rows += toCatalystRow("# Detailed Table Information", "", "")
-    rows += toCatalystRow("Name", table.name(), "")
+    rows += toCatalystRow("Catalog", resolvedTable.catalog.name(), "")
+    rows += toCatalystRow("Database", resolvedTable.identifier.namespace().mkString("."), "")

Review comment:
       is namespace() returning a list? Should this be a single identifier?

##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -120,13 +120,13 @@ class DataSourceV2SQLSuite
   }
 
   test("DescribeTable extended using v2 catalog") {
-    spark.sql("CREATE TABLE testcat.table_name (id bigint, data string)" +
+    spark.sql("CREATE TABLE testcat.default.table_name (id bigint, data string)" +
       " USING foo" +
       " PARTITIONED BY (id)" +
       " TBLPROPERTIES ('bar'='baz')" +
       " COMMENT 'this is a test table'" +
       " LOCATION 'file:/tmp/testcat/table_name'")
-    val descriptionDf = spark.sql("DESCRIBE TABLE EXTENDED testcat.table_name")
+    val descriptionDf = spark.sql("DESCRIBE TABLE EXTENDED testcat.default.table_name")

Review comment:
       Does this also fix SHOW TABLE EXTENDED?




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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