09Catho opened a new pull request, #55670:
URL: https://github.com/apache/arrow/pull/55670

   ### Rationale for this change
   
   GH-55664 is a regression in Python conversion for `fixed_shape_tensor` types 
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?
   
   - Cython parsing of `python/pyarrow/lib.pyx`: passed.
   - Ruff check, Python test-file compilation, and `git diff --check`: passed.
   - The five issue cases pass against the installed PyArrow 18.1 control build.
   - The source pytest module could not be collected because this shallow 
checkout has no compiled `pyarrow.lib` extension.
   
   ### 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:**
   
   - [ ] Human
   - [x] AI
   
   **Reviewed before submission by:**
   
   - [ ] Human
   - [x] AI
   - [ ] Not reviewed
   
   * GitHub Issue: GH-55664
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to