Repository navigation
Conversation
Setting properties to the values they already have still recorded the update, bumping last_updated_ms and defeating the catalogs' skip-commit check, so a metadata version was written for a commit that changes nothing. Record the update only when the merged properties differ from the current ones, matching the remove-properties handler (apache#4545) and Java's PropertiesUpdate.
Fokko
approved these changes
Dec 6, 2026
Fokko
left a comment
Contributor
There was a problem hiding this comment.
Nice follow-up on #4545, @tomron! 🚀 Verified the Java parity myself: in TableMetadata, replaceProperties() only records entries that actually differ and Builder.build() returns base when hasChanges() is false, so a no-op set skips the commit there too. Also confirmed the new catalog test fails without the source change. LGTM!
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
set_propertieswith values the table already has still recorded aSetPropertiesUpdate. That bumpedlast_updated_ms, so the staged metadata no longer equaled the current metadata. The catalogs' skip-commit check (updated_staged_table.metadata == current_table.metadata) never fired, and a new metadata version was written for a commit that changes nothing.This records the update only when the merged properties differ from the current ones. It mirrors the remove-properties handler in #4545 and Java's
PropertiesUpdate. Follow-up to the review discussion on #4545.Are these changes tested?
Yes. A unit test in
tests/table/test_init.pycovers unchanged, new-key, changed-value and mixed updates. A catalog behavior test intests/catalog/test_catalog_behaviors.pychecks that re-setting a property to its current value leavesmetadata_locationunchanged. Both fail without the source change.Are there any user-facing changes?
Yes, small. Re-setting a property to its current value no longer bumps
last_updated_msor writes a new metadata file.RestCatalogis unchanged here, since the server decides.Generated-by: an LLM-based AI coding assistant, reviewed and tested by me