zhengzengprc commented on a change in pull request #3039:
URL: https://github.com/apache/iceberg/pull/3039#discussion_r750726438



##########
File path: core/src/main/java/org/apache/iceberg/util/SnapshotUtil.java
##########
@@ -79,8 +79,11 @@ public static Snapshot oldestAncestorAfter(Table table, Long 
timestampMillis) {
       return null;
     }
 
-    while (current.parentId() != null && 
table.snapshot(current.parentId()).timestampMillis() >= timestamp) {
-      current = table.snapshot(current.parentId());
+    for (Snapshot snapshot : table.snapshots()) {

Review comment:
       The issue of "parent" look up is that once some of the snapshot expired 
in the "parent" look up chain, the chain will be break. I am trying to figure 
out how we can find next available parent snapshot. For example we have a 
parent snapshot shot chain:
   A  <- B(Expired) <- C.
   C.Parent is not available in the snapshots anymore, so I am trying to figure 
out how we can get A as the next available parent snapshot




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