Skip to content

Conversation

@c-thiel
Copy link
Collaborator

@c-thiel c-thiel commented Dec 2, 2025

Which issue does this PR close?

Fixes remove_ref() to preserve snapshot log when removing MainBranch reference during CREATE OR REPLACE TABLE operations. Previously cleared entire snapshot history, causing testReplaceTableKeepsSnapshotLog RCK test to fail.

Related Go Issue: apache/iceberg-go#638

Java also does not clear the log:
https://github.com/apache/iceberg/blob/16e84356dae1975fa04d8c3ecce30a90df18ca9f/core/src/main/java/org/apache/iceberg/TableMetadata.java#L1342-L1352

What changes are included in this PR?

  • Do not clear snapshot_log if ref to main branch is removed

Are these changes tested?

Yes

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @c-thiel for this fix!

@liurenjie1024
Copy link
Contributor

Oh, seems we need to fix ci first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants