pitrou commented on code in PR #49950:
URL: https://github.com/apache/arrow/pull/49950#discussion_r3234974364
##########
python/pyarrow/tests/test_compute.py:
##########
@@ -1987,6 +1987,26 @@ def test_fill_null_array(arrow_type):
assert result.equals(expected)
+def test_replace_with_mask_null_type():
+ # GH-47447: replace_with_mask crashed for null type arrays
+ a = pa.array([None], pa.null())
+ b = pa.array([None], pa.null())
+
+ result = pc.replace_with_mask(a, True, b)
+ assert result.type == pa.null()
Review Comment:
Ok, but can you test the actual result values?
Something like:
```suggestion
assert result.type == pa.null()
result.validate(full=True)
assert result.to_pylist() == [None]
```
--
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]