haizhou-zhao commented on code in PR #6621: URL: https://github.com/apache/iceberg/pull/6621#discussion_r1081700457
########## hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java: ########## @@ -494,6 +494,17 @@ private void setHmsTableParameters( // remove any props from HMS that are no longer present in Iceberg table props obsoleteProps.forEach(parameters::remove); + // altering owner + if (metadata.properties().get(HiveCatalog.HMS_TABLE_OWNER) != null) { + tbl.setOwner(metadata.properties().get(HiveCatalog.HMS_TABLE_OWNER)); + } + + // dropping owner: instead of leaving the owner blank/null, the owner will be + // default to whoever is making the current drop operation + if (obsoleteProps.contains(HiveCatalog.HMS_TABLE_OWNER)) { Review Comment: Fair, I think that's a good point that perhaps simply removing owner and set null is closer to what users want. Trying to do some thing smart here might get user confused instead of helping. As for whether the "drop ownership" use case is needed overall, to be honest I personally do not have and cannot think of a use. However, from the code perspective, there's nothing stopping an iceberg user using iceberg APIs to remove `HiveCatalog.HMS_TABLE_OWNER` property. If that does happen, then I felt the actual intention of the user is to get rid of owner rather than do nothing. Maybe she wants to put the table into a state where only the admin and no other people could access it for a while before she knows for sure who the rightful owner should be. -- 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. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org