zhuxiangyi opened a new pull request, #8139:
URL: https://github.com/apache/paimon/pull/8139

   ### Purpose
   
   This PR adds a non-destructive restore procedure for Flink:
   
   ```sql
   CALL sys.restore_as_latest(`table` => 'default.T', snapshot_id => 3);
   CALL sys.restore_as_latest(`table` => 'default.T', tag => 'tag-1');
   ```
   
   Unlike `rollback_to`, this procedure restores the table to the state of a 
target snapshot or tag by creating a new latest snapshot. Later snapshots and 
tags are preserved.
   
   ### What is changed
   
   - Add `RestoreAsLatestProcedure` and register it in the Flink procedure 
factory list.
   - Add commit support to create a new latest snapshot from the complete data 
manifests of the target snapshot.
   - Add IT coverage for restoring from snapshot and tag, preserving later 
snapshots, and writing after restore.
   - Document the procedure in Flink procedures and snapshot/tag maintenance 
docs.
   
   ### Tests
   
   ```bash
   mvn -pl paimon-flink/paimon-flink-common -am -Pfast-build 
-DfailIfNoTests=false -Dtest=RestoreAsLatestProcedureITCase test
   git diff --check
   ```
   
   ### Notes
   
   This PR is not associated with an issue yet. If the community prefers 
following the discussion-first flow strictly, I can open or join an 
issue/discussion and adjust the design accordingly.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to