fix(serde): reject invalid schema and partition IDs in JSON - #940
Open
kamcheungting-db wants to merge 11 commits into
Open
kamcheungting-db wants to merge 11 commits into
kamcheungting-db wants to merge 11 commits into
Conversation
kamcheungting-db
force-pushed
the
strict-schema-spec-json-ids
branch
from
September 30, 2026 08:09
0c99aa2 to
54f4541
Compare
This was referenced Sep 30, 2026
Contributor
Author
|
This PR is now the final layer in the serde stack:
For the incremental diff that belongs only to this PR, use: In short, an ID like This PR contains the earlier stack commits because all Apache PRs target |
kamcheungting-db
force-pushed
the
strict-schema-spec-json-ids
branch
from
September 30, 2026 10:26
54f4541 to
a0ad0f9
Compare
kamcheungting-db
force-pushed
the
strict-schema-spec-json-ids
branch
from
September 30, 2026 10:55
a0ad0f9 to
62d582c
Compare
kamcheungting-db
force-pushed
the
strict-schema-spec-json-ids
branch
from
September 30, 2026 20:33
62d582c to
28851ed
Compare
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.
Summary
Require schema and partition IDs to be actual, in-range JSON integers.
Generic JSON conversion could previously coerce invalid values. For an ID field, this could turn:
1.5into:
1This PR accepts values such as:
and rejects:
The validation covers schema IDs, field IDs, identifier field IDs, nested list/map IDs, partition source/field IDs, partition spec IDs, and the table-metadata
current-schema-id/default-spec-idreferences.Missing partition field IDs remain supported for legacy v1 metadata; an explicitly present invalid value, including
null, is rejected.Stack
This is 4 of 4 and depends on #939:
DataFileserde into core (refactor(serde): move DataFile JSON handling from REST to core #974)DataFileJSON (fix(serde): make DataFile JSON compatible with Java Iceberg #975)FileScanTaskJSON serde (feat(serde): support standalone FileScanTask JSON in core #939)Each PR targets
main; this PR contains all preceding commits and should be reviewed last.Testing
nulland fractional table-metadata references.