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



##########
File path: nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java
##########
@@ -307,6 +313,41 @@ private UpdateableReference loadReference(String 
requestedRef) {
     }
   }
 
+  private UpdateableReference loadReferenceAtTime(String requestedRef, Instant 
timestamp) {
+    try {
+      Reference ref = requestedRef == null ? 
client.getTreeApi().getDefaultBranch()
+          : client.getTreeApi().getReferenceByName(requestedRef);
+      if (ref instanceof Hash) {
+        LOGGER.warn("Cannot specify a hash {} and timestamp {} together. " +
+            "The timestamp is redundant and has been ignored", requestedRef, 
timestamp);
+        return new UpdateableReference(ref, client.getTreeApi());

Review comment:
       We might want to change the name of `UpdateableReference` because it is 
misleading in a context like this. The reference here isn't actually updateable 
because it is a hash. I think the class is named because it _can_ update _some_ 
references.




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