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


##########
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();

Review Comment:
   That's one way to go, I've been thinking it would actually be simpler if 
when parsing the metadata, if a main branch does not exist, set it to the 
current snapshot. That way a lot of the API logic  can rely on this assumption 
that main exists and we don't need a lot of special code for the case where the 
new Iceberg library is reading an older metadata file where refs (and thus 
main) may not exist.
   
    This PR would be blocked on a PR for doing that so I will raise that.



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