Repository navigation
Conversation
The schema sync collects its updates in a map by field id and put every dropped column under the key 0, so that drops run first. When one sync removed several columns, each drop replaced the one before it in the map and a single column was dropped. The others stayed in the Iceberg schema and were dropped one per later sync. A drop is now keyed by the negative field id of its column, which still runs the drops first and keeps one entry per column. A new test removes two columns in one sync and expects both to be dropped.
yihua
force-pushed
the
ptf-review-drop-removed-columns
branch
from
November 24, 2026 20:56
f3c5795 to
4404a11
Compare
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.
Important Read
Issue: apache#1049, part of apache#722. Based on #8; review that first. The change is already on
iceberg-v3-ptf-poc, which is not meant to land as one PR, so this PR carries one area of it for review.What is the purpose of the pull request
IcebergSchemaSyncput every dropped column under the same map key, so one sync that removed several columns dropped only one of them. A drop is now keyed by the negative field id of its column, which keeps the drops first and one entry per column.Brief change log
IcebergSchemaSynckeys drops by negative field id.Verify this pull request
This change added tests and can be verified as follows:
TestIcebergSchemaSyncremoves two columns in one sync and expects both to be dropped; it fails without the fix, which drops only one.xtable-coreunit tests and 9xtable-coreIceberg ITs pass, and the Iceberg table format's 26 unit tests and 46 ITs pass (1 skipped).