cloud-fan 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_r364596563
########## 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: we should skip printing owner if the properties don't exist ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org