[SQL] Support reading Parquet UUID logical type#57003
Open
ravikiranpagidi wants to merge 2 commits into
Open
Conversation
ravikiranpagidi
marked this pull request as ready for review
July 6, 2026 02:05
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.
What changes were proposed in this pull request?
This PR maps Parquet
UUIDlogical annotations onFIXED_LEN_BYTE_ARRAY(16)columns to Spark SQLBinaryType.It also adds schema conversion coverage and extends the fixed-length byte array IO test with a UUID-annotated column for both vectorized and non-vectorized readers.
Closes #55684.
Why are the changes needed?
Spark currently rejects Parquet UUID columns with
PARQUET_TYPE_ILLEGAL, even though their 16-byte physical representation can be preserved as binary data. Spark does not expose a UUID SQL type, soBinaryTyperetains the value without losing information and matches the handling of unannotated fixed-length byte arrays.Does this PR introduce any user-facing change?
Yes. Spark can read Parquet files containing UUID logical annotations. The UUID values are exposed as 16-byte binary values instead of failing during schema inference.
How was this patch tested?
FIXED_LEN_BYTE_ARRAY(16) (UUID); the test passed.SPARK-41096: FIXED_LEN_BYTE_ARRAY supportto write and read a UUID-annotated field with vectorized and non-vectorized readers.build/sbt "sql/scalastyle"passed with zero findings.git diff --checkpassed.HADOOP_HOME/winutils.exeis unavailable. The schema test itself passed, while the IO suite aborted during shared setup before the targeted test could run.