Introduce Rolling forward to snapshot with Presto Procedure on Iceberg table#21073
Introduce Rolling forward to snapshot with Presto Procedure on Iceberg table#21073Hank27-zhang wants to merge 1 commit intoprestodb:masterfrom
Conversation
|
imjalpreet
left a comment
There was a problem hiding this comment.
On looking at spark procedures in the official iceberg documentation, I feel Presto should be in sync with them so that the users who use spark as well are not confused with the working of each of them.
Spark has two separate procedures for rollback_to_snapshot (https://iceberg.apache.org/docs/1.3.1/spark-procedures/#rollback_to_snapshot) and set_current_snapshot (https://iceberg.apache.org/docs/1.3.1/spark-procedures/#set_current_snapshot).
I had a look at their implementation and they use manageSnapshots().rollbackTo in the case of rollback_to_snapshot and manageSnapshots().setCurrentSnapshot in the other case.
rollback_to_snapshot: https://github.com/apache/iceberg/blob/master/spark/v3.1/spark/src/main/java/org/apache/iceberg/spark/procedures/RollbackToSnapshotProcedure.java#L88C67-L88C67
set_current_snapshot: https://github.com/apache/iceberg/blob/master/spark/v3.1/spark/src/main/java/org/apache/iceberg/spark/procedures/SetCurrentSnapshotProcedure.java#L89
IMO we should also introduce another procedure for setCurrentSnapshot rather than updating the current procedure.
Also, please sign the CLA. |
|
Hi @Hank27-zhang, |
|
@Hank27-zhang are you still working on this? |
|
Closing this in favour of #23567 |
Description
The current existing pedicure rollback_to_snapshot (https://prestodb.io/docs/current/connector/iceberg.html#id2) in the Iceberg connector allows only rolling forward to an old snapshot but we can't roll forward to a different snapshot of ta Iceberg Table. Update the API to support roll-forward as well.
Related issue: #20881
Test Plan
update IcebergDistributedSmokeTestBase.testRollbackSnapshot()
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.
== NO RELEASE NOTE ==