You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "thswlsqls (via GitHub)" <gi...@apache.org> on 2026/07/03 22:52:02 UTC

[PR] Docs: Fix tag-replacement example in Java API quickstart [iceberg]

thswlsqls opened a new pull request, #17084:
URL: https://github.com/apache/iceberg/pull/17084

   
   Closes #17081
   
   ## Summary
   
   - The "Replacing and fast forwarding" example called `replaceBranch(tag, 4)` on `tag = "audit-tag"`, a tag, which throws `IllegalArgumentException` at runtime (`UpdateSnapshotReferencesOperation.replaceBranch` requires the target ref to be a branch).
   - Switched to `replaceTag(tag, 4)`, the API `ManageSnapshots` provides for replacing tags.
   - Matches the same file's usage of `"audit-tag"` as a tag two examples earlier (`useRef("audit-tag")`).
   
   ## Testing done
   
   - Docs-only change, no behavior change — no test added. Verified against `core/src/main/java/org/apache/iceberg/UpdateSnapshotReferencesOperation.java` (`replaceBranch` guard) and `api/src/main/java/org/apache/iceberg/ManageSnapshots.java` (`replaceTag` signature).
   
   
   


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


Re: [PR] Docs: Fix tag-replacement example in Java API quickstart [iceberg]

Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on code in PR #17084:
URL: https://github.com/apache/iceberg/pull/17084#discussion_r3522255416


##########
docs/docs/java-api-quickstart.md:
##########
@@ -252,7 +252,7 @@ table.manageSnapshots()
 String tag = "audit-tag";
 // Replace "audit-tag" to point to snapshot 3 and update its retention
 table.manageSnapshots()
-     .replaceBranch(tag, 4)
+     .replaceTag(tag, 4)
      .setMaxRefAgeMs(1000)

Review Comment:
   The `setMaxRefAgeMs` requires two parameters: 
   
   https://github.com/apache/iceberg/blob/3038fde68307bb5bc95de256670cb0b38ed6de71/api/src/main/java/org/apache/iceberg/ManageSnapshots.java#L217



##########
docs/docs/java-api-quickstart.md:
##########
@@ -252,7 +252,7 @@ table.manageSnapshots()
 String tag = "audit-tag";
 // Replace "audit-tag" to point to snapshot 3 and update its retention
 table.manageSnapshots()
-     .replaceBranch(tag, 4)
+     .replaceTag(tag, 4)

Review Comment:
   > Replace "audit-tag" to point to snapshot 3 and update its retention
   
   I think we should replace 4 with 3:
   
   ```suggestion
        .replaceTag(tag, 3)
   ```



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


Re: [PR] Docs: Fix tag-replacement example in Java API quickstart [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17084:
URL: https://github.com/apache/iceberg/pull/17084#issuecomment-5447804109

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


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


Re: [PR] Docs: Fix tag-replacement example in Java API quickstart [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17084:
URL: https://github.com/apache/iceberg/pull/17084#issuecomment-5363602176

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


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


Re: [PR] Docs: Fix tag-replacement example in Java API quickstart [iceberg]

Posted by "thswlsqls (via GitHub)" <gi...@apache.org>.
thswlsqls commented on code in PR #17084:
URL: https://github.com/apache/iceberg/pull/17084#discussion_r3593078250


##########
docs/docs/java-api-quickstart.md:
##########
@@ -252,7 +252,7 @@ table.manageSnapshots()
 String tag = "audit-tag";
 // Replace "audit-tag" to point to snapshot 3 and update its retention
 table.manageSnapshots()
-     .replaceBranch(tag, 4)
+     .replaceTag(tag, 4)

Review Comment:
   You're right — `3` matches the comment above. Fixed.
   



##########
docs/docs/java-api-quickstart.md:
##########
@@ -252,7 +252,7 @@ table.manageSnapshots()
 String tag = "audit-tag";
 // Replace "audit-tag" to point to snapshot 3 and update its retention
 table.manageSnapshots()
-     .replaceBranch(tag, 4)
+     .replaceTag(tag, 4)
      .setMaxRefAgeMs(1000)

Review Comment:
   Good catch — fixed to `.setMaxRefAgeMs(tag, 1000)`.
   



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


Re: [PR] Docs: Fix tag-replacement example in Java API quickstart [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #17084: Docs: Fix tag-replacement example in Java API quickstart
URL: https://github.com/apache/iceberg/pull/17084


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