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/05 10:26:20 UTC

[GitHub] [iceberg] snazy commented on a diff in pull request #4700: Nessie: Use ref.hash parameter to read data at given hash

snazy commented on code in PR #4700:
URL: https://github.com/apache/iceberg/pull/4700#discussion_r865763337


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieIcebergClient.java:
##########
@@ -87,7 +87,9 @@ public void refresh() throws NessieNotFoundException {
   }
 
   public NessieIcebergClient withReference(String requestedRef, String hash) {
-    if (null == requestedRef) {
+    if (null == requestedRef ||
+        getRef().getReference().getName().equals(requestedRef) ||
+        getRef().getHash().equals(hash)) {

Review Comment:
   Sure that you want equals on ref-name _OR_ hash? I.e. still return `this`, if the branch name doesn't change?



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