yaooqinn commented on a change in pull request #26775: [SPARK-30018][SQL] 
Support ALTER DATABASE SET OWNER syntax
URL: https://github.com/apache/spark/pull/26775#discussion_r364623384
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DescribeNamespaceExec.scala
 ##########
 @@ -35,21 +35,23 @@ case class DescribeNamespaceExec(
     namespace: Seq[String],
     isExtended: Boolean) extends V2CommandExec {
   private val encoder = 
RowEncoder(StructType.fromAttributes(output)).resolveAndBind()
+  import SupportsNamespaces._
 
   override protected def run(): Seq[InternalRow] = {
     val rows = new ArrayBuffer[InternalRow]()
     val ns = namespace.toArray
     val metadata = catalog.loadNamespaceMetadata(ns)
 
     rows += toCatalystRow("Namespace Name", ns.last)
-    rows += toCatalystRow("Description", 
metadata.get(SupportsNamespaces.PROP_COMMENT))
-    rows += toCatalystRow("Location", 
metadata.get(SupportsNamespaces.PROP_LOCATION))
+    rows += toCatalystRow("Description", metadata.get(PROP_COMMENT))
+    rows += toCatalystRow("Location", metadata.get(PROP_LOCATION))
+    rows += toCatalystRow("Owner Name", metadata.getOrDefault(PROP_OWNER_NAME, 
""))
 
 Review comment:
   yes, this fields are optional across different catalog implementations

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