Conversation
Signed-off-by: 1fanwang <[email protected]>
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
A 16-byte fixed-size Arrow binary field comes back as variable-width Binary after writing a file with the converted Parquet schema. The bytes and nulls survive, but the declared width is lost.
What changes are included in this PR?
Positive fixed-size binary widths now map to fixed-length Parquet storage and back. Zero-width fields keep their BINARY representation because Parquet requires a positive fixed length. Decimal annotations and INT96 mappings are unchanged.
Are these changes tested?
The regression writes a real file containing a 16-byte value and a null row, reads both back, and checks the recovered Arrow schema.
Testing Done
I ran the same regression on the baseline and this change with Java 17 and Maven 3.9.16. From the PR checkout:
Raw logs
Before:
After:
The added dependencies are test-scoped for the file roundtrip.
Are there any user-facing changes?
Yes. Positive fixed-size binary fields retain their declared widths when converting schemas in either direction.