[Iceberg] Support procedure set_current_snapshot for Iceberg#23567
Merged
agrawalreetika merged 1 commit intoprestodb:masterfrom Sep 6, 2024
Merged
Conversation
hantangwangd
reviewed
Sep 3, 2024
Member
hantangwangd
left a comment
There was a problem hiding this comment.
Overall looks good to me, one little thing about parameter checking and error message.
...iceberg/src/main/java/com/facebook/presto/iceberg/procedure/SetCurrentSnapshotProcedure.java
Show resolved
Hide resolved
85da3a4 to
ce037f3
Compare
steveburnett
requested changes
Sep 3, 2024
Contributor
steveburnett
left a comment
There was a problem hiding this comment.
Thanks for the doc! A few nits and suggestions of rephrasing and formatting.
Let me know if my suggestions change your intended meaning in a way that is not correct!
ce037f3 to
d065c5b
Compare
steveburnett
previously approved these changes
Sep 3, 2024
Contributor
steveburnett
left a comment
There was a problem hiding this comment.
LGTM! (docs)
Pull updated branch, new local doc build, looks good. Thanks!
imjalpreet
requested changes
Sep 3, 2024
Member
imjalpreet
left a comment
There was a problem hiding this comment.
Thanks for the contribution, I have a few minor suggestions.
...erg/src/test/java/com/facebook/presto/iceberg/procedure/TestSetCurrentSnapshotProcedure.java
Show resolved
Hide resolved
...erg/src/test/java/com/facebook/presto/iceberg/procedure/TestSetCurrentSnapshotProcedure.java
Outdated
Show resolved
Hide resolved
d065c5b to
99756d5
Compare
hantangwangd
approved these changes
Sep 5, 2024
Member
hantangwangd
left a comment
There was a problem hiding this comment.
Thanks for the fix. LGTM!
ZacBlanco
approved these changes
Sep 5, 2024
This was referenced Sep 6, 2024
25 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Support for procedure
set_current_snapshotfor IcebergMotivation and Context
Support for procedure
set_current_snapshotfor Iceberg. https://iceberg.apache.org/docs/1.5.1/spark-procedures/#set_current_snapshotSince Presto already has
rollback_to_snapshotprocedure to go back to a snapshot, there was no way to forward it after doing so. Hereset_current_snapshotprocedure would be useful to handle this scenario.Impact
New Procedure is introduced which can be used something like -
Set current table snapshot ID for the given table to 10000:
CALL iceberg.system.set_current_snapshot('schema_name', 'table_name', 10000);Set current table snapshot ID for the given table to snapshot ID of branch1:
CALL iceberg.system.set_current_snapshot('schema_name', 'table_name', 'branch1');Test Plan
Added new tests with a different scenario
Contributor checklist
Release Notes