Skip to content

Spark: Support Parquet dictionary encoded UUIDs #13324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Fokko
Copy link
Contributor

@Fokko Fokko commented Jun 16, 2025

While fixing some issues on the PyIceberg ends to fully support UUIDs: apache/iceberg-python#2007

I noticed this issue, and was suprised since UUID used to work with Spark, but it turns out that the dictionary encoded UUID was not implemented yet.

For PyIceberg we only generate little data, so therefore this wasn't caught previously.

Closes #4581

While fixing some issues on the PyIceberg ends to fully support UUIDs:
apache/iceberg-python#2007

I noticed this issue, and was suprised since UUID used to work with
Spark, but it turns out that the dictionary encoded UUID was not
implemented yet.

For PyIceberg we only generate little data, so therefore this wasn't
caught previously.
Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM

Is there a way to test this? Can we add a dictionary encoded UUID like this?

Copy link

@dingo4dev dingo4dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fokko TIA.

Do we have any tests for the UUIDs partition read?

@Fokko
Copy link
Contributor Author

Fokko commented Jun 18, 2025

@DinGo4DEV Yes, we have tests for plain encoded UUIDs, let me add one for dictionary encoded UUIDs as well 👍

@Fokko
Copy link
Contributor Author

Fokko commented Jun 18, 2025

Is there a way to test this? Can we add a dictionary encoded UUID like this?

Just found out that the test above is not testing this code path, since Spark projects a UUID into a String.

Test has been added and checked using breakpoints that it hits the newly added lines 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spark: Cannot read or write UUID columns
3 participants