[ 
https://issues.apache.org/jira/browse/HIVE-25139?focusedWorklogId=600241&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-600241
 ]

ASF GitHub Bot logged work on HIVE-25139:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/May/21 09:16
            Start Date: 21/May/21 09:16
    Worklog Time Spent: 10m 
      Work Description: 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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 600241)
    Time Spent: 50m  (was: 40m)

> Filter out null table properties in HiveIcebergMetaHook
> -------------------------------------------------------
>
>                 Key: HIVE-25139
>                 URL: https://issues.apache.org/jira/browse/HIVE-25139
>             Project: Hive
>          Issue Type: Bug
>            Reporter: László Pintér
>            Assignee: László Pintér
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to