Spenserrrr opened a new pull request, #58199:
URL: https://github.com/apache/spark/pull/58199

   ### What changes were proposed in this pull request?
   
   `PyArrowArrayFromPandasTypeScalarTests` (added in SPARK-58765) has a 
`float64:infinity -> int8/int64` cell whose result is platform-dependent: 
converting `inf` to an integer is undefined behavior in C++, and ARM's `FCVT` 
saturates to `INT64_MAX` (truncated to `-1` for int8) while x86 returns the 
"integer indefinite" `INT_MIN`. The golden files are generated on x86, so the 
scalar `unsafe` test fails on the scheduled ARM (aarch64) and macOS (arm64) 
Python-only builds.
   
   This adds an ARM override (`platform.machine() in ("aarch64", "arm64")`) for 
those two cells, following the existing pattern in 
`test_pyarrow_array_cast.py`. Only the `unsafe` method needs it -- `safe=True` 
rejects `inf -> int` on every platform. Test-only change; no golden files 
change (the override is inert on x86).
   
   ### Why are the changes needed?
   
   The scheduled ARM and macOS Python-only builds are currently red on these 
two cells because the golden pins x86 values for a conversion that is undefined 
behavior and differs on ARM.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   The override is inert on x86, so the existing goldens are unchanged and the 
scalar tests still pass locally. The ARM/macOS values come from the failing 
scheduled runs and match `test_pyarrow_array_cast.py`'s hardcoded ARM values 
for the same `inf -> int` conversion. Confirmed on the ARM and macOS runners 
before marking ready.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8)
   


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