You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/12/13 06:01:10 UTC

[GitHub] [iceberg] rawataaryan9 commented on a change in pull request #3696: Core : Adding more information in CreateSnapshotEvent Summary

rawataaryan9 commented on a change in pull request #3696:
URL: https://github.com/apache/iceberg/pull/3696#discussion_r767432070



##########
File path: core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java
##########
@@ -551,20 +552,25 @@ public Object updateEvent() {
     long snapshotId = snapshotId();
     Snapshot justSaved = ops.refresh().snapshot(snapshotId);
     long sequenceNumber = TableMetadata.INVALID_SEQUENCE_NUMBER;
+    Map<String, String> summary = summary();
     if (justSaved == null) {
       // The snapshot just saved may not be present if the latest metadata couldn't be loaded due to eventual
       // consistency problems in refresh.
       LOG.warn("Failed to load committed snapshot: omitting sequence number from notifications");
     } else {
       sequenceNumber = justSaved.sequenceNumber();
+      summary = ImmutableMap.<String, String>builder()
+              .putAll(summary)
+              .putAll(SnapshotSummary.fetchTotalStatsFromSummary(justSaved.summary()))
+              .build();
     }
 
     return new CreateSnapshotEvent(
         tableName,
         operation(),
         snapshotId,
         sequenceNumber,
-        summary());
+        summary);

Review comment:
       makes sense, will use entire summary instead. It will cover any further info in summary directly.




-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org