yaooqinn commented on a change in pull request #27249: [SPARK-30019][SQL] Add
ALTER TABLE SET OWNER syntax
URL: https://github.com/apache/spark/pull/27249#discussion_r367943749
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
##########
@@ -569,7 +570,11 @@ private[hive] class HiveClientImpl(
override def createTable(table: CatalogTable, ignoreIfExists: Boolean): Unit
= withHiveState {
verifyColumnDataType(table.dataSchema)
- client.createTable(toHiveTable(table, Some(userName)), ignoreIfExists)
+ val ownerType =
+ table.properties.getOrElse(TableCatalog.PROP_OWNER_TYPE,
PrincipalType.USER.name())
Review comment:
the hive catalog's ownership is decided by this class as Database does,
it's simpler. For v2 commands, we have to do injection in our plans because we
are not the catalog developer. As if we are, we also only need to inject
ownership in that catalog's `createTable `
----------------------------------------------------------------
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]