rdblue commented on a change in pull request #2660:
URL: https://github.com/apache/iceberg/pull/2660#discussion_r655711170



##########
File path: core/src/main/java/org/apache/iceberg/util/SnapshotUtil.java
##########
@@ -107,4 +120,19 @@ public static boolean ancestorOf(Table table, long 
snapshotId, long ancestorSnap
 
     return newFiles;
   }
+
+  /**
+   * traverses through the table's snapshots and finds the {@link Table}'s
+   * Snapshot that is committed after the specified snapshotId
+   * @return null if passed in snapshot expired, else the snapshot after the 
passed in snapshot

Review comment:
       I don't think this quite captures what the method is doing because it 
doesn't mention that this is with respect to the table's current state. How 
about this?
   
   > Traverses the history of the table's current snapshot and finds the 
snapshot with the given snapshot id as its parent.
   
   I think this should also document the behavior when:
   * The given snapshot ID is not found in the table 
(`IllegalArgumentException`?)
   * The given snapshot ID is not an ancestor of the current table state 
(`IllegalStateException`?)
   
   Nit: We also prefer to use sentence case for documentation.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to