Yicong-Huang opened a new pull request, #53937:
URL: https://github.com/apache/spark/pull/53937

   ### What changes were proposed in this pull request?
   
   Fix `test_pyarrow_array_cast.py` to work with PyArrow 18-20 by adding a 
`_make_float16_array` helper that uses `numpy.float16` for older versions 
(PyArrow < 21 requires `np.float16` instances, while >= 21 accepts Python 
floats directly).
   
   ### Why are the changes needed?
   
   Tests were failing on PyArrow 18-20 with `ArrowTypeError: Expected 
np.float16 instance`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Manually tested on PyArrow 18, 19, 20, 21, 22 - all pass.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to