rdblue commented on a change in pull request #688: [ISSUE #672] Add 
SupportsNamespaces for 'HadoopCatalog' and 'HiveCatalog'
URL: https://github.com/apache/incubator-iceberg/pull/688#discussion_r361728271
 
 

 ##########
 File path: hive/src/main/java/org/apache/iceberg/hive/HiveCatalog.java
 ##########
 @@ -188,6 +330,48 @@ protected String defaultWarehouseLocation(TableIdentifier 
tableIdentifier) {
         tableIdentifier.name());
   }
 
+  public  Map<String, String> convertToMetadata(Database database) {
+    Map<String, String> nameMap = Maps.newHashMap();
+
+    nameMap.put("name", database.getName());
+    nameMap.put("location", database.getLocationUri());
+    nameMap.put("comment", database.getDescription());
+    database.getParameters().forEach(nameMap::put);
+
+    return nameMap;
 
 Review comment:
   This should return an `ImmutableMap`. Can you convert this to use 
`ImmutableMap.Builder`?

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

Reply via email to