Skip to content

[SQL] Support reading Parquet UUID logical type#57003

Open
ravikiranpagidi wants to merge 2 commits into
apache:masterfrom
ravikiranpagidi:parquet-uuid-logical-type
Open

[SQL] Support reading Parquet UUID logical type#57003
ravikiranpagidi wants to merge 2 commits into
apache:masterfrom
ravikiranpagidi:parquet-uuid-logical-type

Conversation

@ravikiranpagidi

Copy link
Copy Markdown

What changes were proposed in this pull request?

This PR maps Parquet UUID logical annotations on FIXED_LEN_BYTE_ARRAY(16) columns to Spark SQL BinaryType.

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, so BinaryType retains 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?

  • Added a Parquet-to-Catalyst schema conversion test for FIXED_LEN_BYTE_ARRAY(16) (UUID); the test passed.
  • Extended SPARK-41096: FIXED_LEN_BYTE_ARRAY support to write and read a UUID-annotated field with vectorized and non-vectorized readers.
  • build/sbt "sql/scalastyle" passed with zero findings.
  • git diff --check passed.
  • On this Windows environment, the shared Spark SQL test harness reports that HADOOP_HOME / winutils.exe is unavailable. The schema test itself passed, while the IO suite aborted during shared setup before the targeted test could run.

@ravikiranpagidi
ravikiranpagidi marked this pull request as ready for review July 6, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Illegal Parquet type: FIXED_LEN_BYTE_ARRAY (UUID)

1 participant