shangxinli opened a new pull request, #926:
URL: https://github.com/apache/iceberg-cpp/pull/926

   Adds `CherryPickOperation` and implements `SnapshotManager::Cherrypick()`, 
which was a TODO stub.
   
   Follows Java's `CherryPickOperation`: appends re-apply their added files, 
dynamic overwrites (`replace-partitions`) re-apply adds and deletes and are 
rejected if a replaced partition changed, and anything else can only be 
fast-forward. Records `source-snapshot-id` and `published-wap-id`, and rejects 
a WAP id that was already published.
   
   Like Java, the operation is reachable only through `Transaction`, not 
`Table`.
   
   One divergence worth a look: `Apply()` here always builds a new snapshot, so 
it cannot express Java's fast-forward, which returns an existing one. 
`SnapshotManager` instead routes a fast-forward to `SetSnapshot`, with the 
predicate in `SnapshotUtil::CanFastForward()` so there is a single definition. 
`SetSnapshot::RequireFastForward()` re-checks it at apply time so a commit 
retry cannot silently turn the fast-forward into a branch move.
   
   14 tests ported from Java `TestSnapshotManager` and `TestWapWorkflow`.
   
   Part of #637.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to