This is an automated email from the ASF dual-hosted git repository.
gaogaotiantian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new dc0022b60a0d [MINOR][PYTHON][TEST] Update macOS unsafe cast
expectations for PyArrow 26
dc0022b60a0d is described below
commit dc0022b60a0dc9488dbb962a6d855633a7acbd7c
Author: Spenser Sun <[email protected]>
AuthorDate: Tue Nov 10 14:16:18 2026 -0800
[MINOR][PYTHON][TEST] Update macOS unsafe cast expectations for PyArrow 26
### What changes were proposed in this pull request?
- Update two unsafe scalar-cast expectations for macOS ARM64 with PyArrow
26.
- Keep the existing expectations for older PyArrow versions and other
platforms.
### Why are the changes needed?
The macOS periodic job reports two golden mismatches with PyArrow 26.0.1;
for example, casting float32 `-1.5` to uint16 returns `0` instead of the
recorded `65535`.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Ran `test_pyarrow_array_cast.py` and [native macOS version
probes](https://github.com/Spenserrrr/spark/actions/runs/42779230029); the
unsafe scalar test fails without the update on macOS ARM64.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-6)
Closes #60291 from Spenserrrr/pyarrow-cast-macos-overrides.
Authored-by: Spenser Sun <[email protected]>
Signed-off-by: Tian Gao <[email protected]>
skip-checks: true
---
python/pyspark/tests/upstream/pyarrow/test_pyarrow_array_cast.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/python/pyspark/tests/upstream/pyarrow/test_pyarrow_array_cast.py
b/python/pyspark/tests/upstream/pyarrow/test_pyarrow_array_cast.py
index fe585b207a80..dba6fb776ad8 100644
--- a/python/pyspark/tests/upstream/pyarrow/test_pyarrow_array_cast.py
+++ b/python/pyspark/tests/upstream/pyarrow/test_pyarrow_array_cast.py
@@ -525,6 +525,13 @@ class PyArrowScalarTypeCastTests(_PyArrowCastTestBase):
("float64:special", "int32"): "[2147483647,
-2147483648, 0, None]@int32",
}
)
+ if LooseVersion(pa.__version__) >= LooseVersion("26.0.0"):
+ overrides.update(
+ {
+ ("float32:standard", "uint16"): "[0, 1, 0,
None]@uint16",
+ ("float64:special", "int32"): "[-1, 0, 0,
None]@int32",
+ }
+ )
return overrides
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]