Ppei-Wang commented on code in PR #11751:
URL: https://github.com/apache/iceberg/pull/11751#discussion_r1881750426


##########
spark/v3.4/spark-extensions/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DescribeV2ViewExec.scala:
##########
@@ -55,18 +55,20 @@ case class DescribeV2ViewExec(
   private def describeExtended: Seq[InternalRow] = {
     val outputColumns = view.queryColumnNames.mkString("[", ", ", "]")
     val properties: Map[String, String] = view.properties.asScala.toMap -- 
ViewCatalog.RESERVED_PROPERTIES.asScala
-    val viewCatalogAndNamespace: Seq[String] = view.currentCatalog +: 
view.currentNamespace.toSeq
+    val viewCatalogAndNamespace: Seq[String] = view.name.split("\\.").take(2)
     val viewProperties = properties.toSeq.sortBy(_._1).map {
       case (key, value) =>
         s"'${escapeSingleQuotedString(key)}' = 
'${escapeSingleQuotedString(value)}'"
     }.mkString("[", ", ", "]")
+    val viewText = view.query
 
 
     toCatalystRow("# Detailed View Information", "", "") ::
       toCatalystRow("Comment", 
view.properties.getOrDefault(ViewCatalog.PROP_COMMENT, ""), "") ::
       toCatalystRow("View Catalog and Namespace", 
viewCatalogAndNamespace.quoted, "") ::
       toCatalystRow("View Query Output Columns", outputColumns, "") ::
       toCatalystRow("View Properties", viewProperties, "") ::
+      toCatalystRow("View Text", viewText, "") ::

Review Comment:
   ok,i got it.



-- 
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: issues-unsubscr...@iceberg.apache.org

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


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

Reply via email to