Repository navigation
Conversation
… none Servers that parse the request with Iceberg Java's PartitionSpecParser, such as Apache Polaris, reject a partition spec without spec-id.
ahlag
marked this pull request as ready for review
October 17, 2026 10:50
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.
Which issue does this PR close?
What changes are included in this PR?
RestCatalog::create_tablenow sendsspec-id: 0when theUnboundPartitionSpechas no spec id, and keeps the id when one is set. Since #2610 an unset id is omitted, and servers that parse the request with Iceberg Java'sPartitionSpecParser(e.g. Polaris) reject it with HTTP 400. 0 is the initial spec id, and is what the Java client sends for a new table.The default is applied where the request is built rather than in the serde attributes of
UnboundPartitionSpec, which is also serialized forTableUpdate::AddSpec(#2702 discussed moving the skip out of the core type).Are these changes tested?
Yes,
test_create_tablenow matches the request body for"partition-spec": {"spec-id": 0}. It fails without the fix.AI Disclosure
I used Claude Code to find the cause and write the fix and test. I reviewed the change and checked that the test fails without the fix. Points to check: whether 0 is the right default (Java servers assign a fresh spec id on create, so I believe the value is not used), and whether the literal 0 is fine here since
DEFAULT_PARTITION_SPEC_IDispub(crate)iniceberg.