Repository navigation
Fix append to a table identity-partitioned on a uuid column - #4360
Queued
rahulsmahadev wants to merge 1 commit into
Queued
rahulsmahadev wants to merge 1 commit into
rahulsmahadev wants to merge 1 commit into
Conversation
Appending to a table identity-partitioned on a uuid column raised ArrowNotImplementedError: _determine_partitions groups and filters on the arrow.uuid extension type, which PyArrow has no kernels for. Use the storage type (fixed_size_binary(16)) of extension-typed partition columns; the written data keeps its uuid type. Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
Author
Fokko
approved these changes
Nov 13, 2026
Fokko
left a comment
Contributor
There was a problem hiding this comment.
Thanks @rahulsmaydevv! Verified locally: both tests fail on main with the ArrowNotImplementedError and pass with the change, and the manifest partition values read back correctly. LGTM! 🚀
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.
Rationale for this change
Table.appendfails for a table identity-partitioned on auuidcolumn:The identity transform returns the
arrow.uuidcolumn unchanged, and PyArrow has no group by or equality kernel for extension types, so thegroup_byin_determine_partitionsfails before any file is written. Bucketing on the uuid column works because the bucket transform returns an int.This change groups and filters on the storage type of extension-typed partition columns (
fixed_size_binary(16)for uuid). PyArrow does not plan compute kernels for extension types (apache/arrow#39024 was closed as not planned), so this stays needed. The data columns are unchanged, so the Parquet files keep the uuid type, and the partition values are the 16 bytes the manifests store for a uuid.Not changed here: an equality filter on a uuid identity partition still plans no files, because partition pruning compares the UUID read from the manifest with a bytes literal. That also affects tables written by other engines, and I'll send it as a separate fix.
Are these changes tested?
Yes. Two new tests in
tests/io/test_pyarrow.pyfail withArrowNotImplementedError: Keys of type extension<arrow.uuid>without this change and pass with it, on pyarrow 25 and 18:test_determine_partitions_with_uuid_column: the partition keys (including a null partition), the rows of each partition, and that the data keeps the uuid type.test_append_uuid_to_table_partitioned_on_uuid: an append through thecatalogfixture, the rows read back, and the partition values of the data files.Are there any user-facing changes?
Bug fix only: appending to a table identity-partitioned on a uuid column no longer raises. No API change.
This pull request and its description were written by Isaac.