gaborkaszab commented on code in PR #6045:
URL: https://github.com/apache/iceberg/pull/6045#discussion_r1017654923


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -518,11 +522,36 @@ private Map<String, String> convertToMetadata(Database 
database) {
     if (database.getDescription() != null) {
       meta.put("comment", database.getDescription());
     }
+    if (database.getOwnerName() != null) {
+      meta.put(TableProperties.HMS_DB_OWNER, database.getOwnerName());
+      if (database.getOwnerType() != null) {
+        meta.put(TableProperties.HMS_DB_OWNER_TYPE, 
database.getOwnerType().name());
+      }
+    }
 
     return meta;
   }
 
   Database convertToDatabase(Namespace namespace, Map<String, String> meta) {
+    Preconditions.checkArgument(

Review Comment:
   Thanks for the explanation, @haizhou-zhao! We definitely use Preconditions 
in Impala for other purposes as we instead guarantee that the internal 
invariant is not hurt and we don't validate user input with them. But we might 
use it against the original purpose then :)
   Thanks again for the explanation!



-- 
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

Reply via email to