danielcweeks commented on code in PR #6811:
URL: https://github.com/apache/iceberg/pull/6811#discussion_r1103864887


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -885,7 +921,7 @@ private Builder(TableMetadata base) {
       this.sortOrders = Lists.newArrayList(base.sortOrders);
       this.properties = Maps.newHashMap(base.properties);
       this.currentSnapshotId = base.currentSnapshotId;
-      this.snapshots = Lists.newArrayList(base.snapshots);
+      this.snapshots = Lists.newArrayList(base.snapshots());

Review Comment:
   For now, it's safest to eagerly load snapshots when building new metadata.  
The issue with carrying over the snapshot supplier is that we don't perform the 
proper validation and pruning unless we extract the logic that is done in the 
base metadata.
   
   I think that would be a good follow up to see if it's safe, but I don't 
think we need to do that immediately.



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