yaooqinn 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_r353572328
########## File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ########## @@ -809,6 +846,22 @@ private[client] class Shim_v0_13 extends Shim_v0_12 { } } + override def getDatabaseOwnerName(db: Database): String = { + Option(getDatabaseOwnerNameMethod.invoke(db)).map(_.asInstanceOf[String]).getOrElse("") + } + + override def setDatabaseOwnerName(db: Database, owner: String): Unit = { + setDatabaseOwnerNameMethod.invoke(db, owner) + } + + override def getDatabaseOwnerType(db: Database): String = { + Option(getDatabaseOwnerTypeMethod.invoke(db)) + .map(_.asInstanceOf[PrincipalType].name()).getOrElse(PrincipalType.USER.name()) Review comment: agree ---------------------------------------------------------------- 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