1fanwang commented on PR #4020: URL: https://github.com/apache/iceberg-python/pull/4020#issuecomment-7289688564
> One question: in `set_current_snapshot` (pyiceberg/table/update/snapshot.py:1262) the new code always reads the existing ref from `MAIN_BRANCH`, but the method also accepts a `ref_name` argument. When `ref_name` is passed, is the intent still to move main, or should the retention be looked up from that ref instead? The intent is always to move main: a few lines below, the call always passes ref_name=MAIN_BRANCH to _set_ref_snapshot, regardless of whether snapshot_id or ref_name was the argument. When ref_name is passed, it only resolves which snapshot_id becomes current, it never changes which ref gets updated. So reading the existing retention from MAIN_BRANCH matches what the method actually does: main's own settings carry forward onto its new snapshot, whichever way that snapshot was chosen. -- 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]
