jackye1995 commented on a change in pull request #3104:
URL: https://github.com/apache/iceberg/pull/3104#discussion_r782437052



##########
File path: api/src/main/java/org/apache/iceberg/Table.java
##########
@@ -138,6 +139,22 @@ default String name() {
    */
   List<HistoryEntry> history();
 
+  /**
+   * Get the snapshot references of this table.
+   *
+   * @return a map with ref name as key, {@link SnapshotRef} as value
+   */
+  Map<String, SnapshotRef> refs();
+
+  /**
+   * Get the snapshot references of a snapshot.
+   *
+   * @param snapshotId snapshot ID
+   * @return a set of {@link SnapshotRef snapshot references} of a snapshot.
+   *         Note that when there is no ref, it returns an empty set but not 
null.
+   */
+  Set<SnapshotRef> refs(long snapshotId);

Review comment:
       I was thinking it's useful in subsequent PRs for updating the snapshot 
expiration logic, but we can remove this for now and just have a method for 
querying the snapshot of a specific ref name.




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