deniskuzZ commented on code in PR #5498:
URL: https://github.com/apache/hive/pull/5498#discussion_r1809320632


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -471,6 +483,22 @@ public Map<String, String> getBasicStatistics(Partish 
partish) {
         Map<String, String> summary = table.currentSnapshot().summary();
         if (summary != null) {
 
+          if 
(Boolean.parseBoolean(summary.get(SnapshotSummary.PARTITION_SUMMARY_PROP)) &&
+                partish.getPartition() != null) {
+            String key = SnapshotSummary.CHANGED_PARTITION_PREFIX + 
partish.getPartition().getName();
+            Map<String, String> map = Maps.newHashMap();
+
+            if (summary.containsKey(key)) {
+              StringTokenizer tokenizer = new 
StringTokenizer(summary.get(key), ",");
+              while (tokenizer.hasMoreTokens()) {
+                String token = tokenizer.nextToken();
+                String[] keyValue = token.split("=");
+                map.put(keyValue[0], keyValue[1]);
+              }
+            }
+            summary = map;

Review Comment:
   noted, I'll refactor



-- 
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: [email protected]

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