pvary commented on a change in pull request #2298:
URL: https://github.com/apache/hive/pull/2298#discussion_r636767202



##########
File path: 
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java
##########
@@ -315,10 +318,10 @@ private void 
updateHmsTableProperties(org.apache.hadoop.hive.metastore.api.Table
   private static Properties 
getCatalogProperties(org.apache.hadoop.hive.metastore.api.Table hmsTable) {
     Properties properties = new Properties();
 
-    hmsTable.getParameters().forEach((key, value) -> {
+    hmsTable.getParameters().entrySet().stream().filter(e -> e.getKey() != 
null && e.getValue() != null).forEach(e -> {
       // translate key names between HMS and Iceberg where needed
-      String icebergKey = HiveTableOperations.translateToIcebergProp(key);
-      properties.put(icebergKey, value);
+      String icebergKey = 
HiveTableOperations.translateToIcebergProp(e.getKey());

Review comment:
       nit: Why not
   ```
   hmsTable.getParameters().entrySet().stream().filter(e -> e.getKey() != null 
&& e.getValue() != null).forEach((key, value) -> {
   ```
   and then we do not need these changes? Is it nicer or easier to read?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to