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 2022/05/30 04:47:01 UTC

[GitHub] [iceberg] amogh-jahagirdar commented on a diff in pull request #4428: Core, API: Add getting refs and snapshot by ref to the Table API

amogh-jahagirdar commented on code in PR #4428:
URL: https://github.com/apache/iceberg/pull/4428#discussion_r884414425


##########
api/src/main/java/org/apache/iceberg/Table.java:
##########
@@ -297,4 +297,25 @@ default AppendFiles newFastAppend() {
    * Returns a {@link LocationProvider} to provide locations for new data files.
    */
   LocationProvider locationProvider();
+
+  /**
+   * Returns the current refs for the table
+   *
+   * @return the current refs for the table
+   */
+  Map<String, SnapshotRef> refs();
+
+  /**
+   * Returns the snapshot referenced by the given name or null if no such reference exists.
+   *
+   * @return the snapshot which is referenced by the given name or null if no such reference exists.
+   */
+  default Snapshot snapshot(String name) {

Review Comment:
   Implemented snapshot(String name) a default method on the Table API because most of the table implementations would have this same logic.



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