cloud-fan commented on a change in pull request #26080: [SPARK-29425][SQL] The
ownership of a database should be respected
URL: https://github.com/apache/spark/pull/26080#discussion_r353169274
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
##########
@@ -172,19 +174,23 @@ case class DescribeDatabaseCommand(
override def run(sparkSession: SparkSession): Seq[Row] = {
val dbMetadata: CatalogDatabase =
sparkSession.sessionState.catalog.getDatabaseMetadata(databaseName)
+ val allDbProperties = dbMetadata.properties
val result =
Row("Database Name", dbMetadata.name) ::
Row("Description", dbMetadata.description) ::
- Row("Location", CatalogUtils.URIToString(dbMetadata.locationUri)) ::
Nil
+ Row("Location", CatalogUtils.URIToString(dbMetadata.locationUri))::
+ Row("Owner Name", allDbProperties.getOrElse(PROP_OWNER_NAME, "")) ::
+ Row("Owner Type", allDbProperties.getOrElse(PROP_OWNER_TYPE, "")) ::
Nil
Review comment:
Shall we have a consistent default value? `PrincipalType.USER` and '', which
one is better?
----------------------------------------------------------------
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]