Test null handling in input array.
()
| 1343 | |
| 1344 | |
| 1345 | def test_replace_with_mask_null_in_array(): |
| 1346 | """Test null handling in input array.""" |
| 1347 | arr = pa.array([1, None, 3, None, 5]) |
| 1348 | mask = pa.array([False, True, False, True, True]) |
| 1349 | replacements = pa.array([10, 20, 30]) |
| 1350 | expected = pa.array([1, 10, 3, 20, 30]) |
| 1351 | result = pc.replace_with_mask(arr, mask, replacements) |
| 1352 | assert result.equals(expected) |
| 1353 | |
| 1354 | |
| 1355 | def test_replace_with_mask_null_in_mask(): |