Repository navigation
Conversation
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
GH-55664 is a regression in Python conversion for
fixed_shape_tensortypes with a permutation. The current guard rejects empty, null, and flat-storage inputs before checking whether any element would need a transpose.What changes are included in this PR?
The guard now rejects only multi-dimensional elements paired with a non-identity permutation. Identity permutations and inputs without a logical layout continue through the normal converter. The unsupported case now raises
ArrowNotImplementedError. Regression coverage covers empty, null, flat-storage, identity-permutation, and rejected non-identity array inputs.Are these changes tested?
python/pyarrow/lib.pyx: passed.git diff --check: passed.pyarrow.libextension.Are there any user-facing changes?
Yes. These valid inputs work again, matching the behavior before the regression.
This PR contains a "Critical Fix".
Yes. The regression prevents construction of empty tables and records with tensor columns produced by
FixedShapeTensorArray.from_numpy_ndarray.Was AI used for this PR?
AI was used to prepare the initial patch and regression tests. The change was reviewed against the implementation, the issue reproducer, and the available local validation before submission.
PR code and description written by:
Reviewed before submission by:
fixed_shape_tensorwith permutation #55664