Test null handling in mask.
()
| 1353 | |
| 1354 | |
| 1355 | def test_replace_with_mask_null_in_mask(): |
| 1356 | """Test null handling in mask.""" |
| 1357 | arr = pa.array([1, 2, 3, 4, 5, 6]) |
| 1358 | mask = pa.array([False, False, None, None, True, True]) |
| 1359 | replacements = pa.array([10, None]) |
| 1360 | expected = pa.array([1, 2, None, None, 10, None]) |
| 1361 | result = pc.replace_with_mask(arr, mask, replacements) |
| 1362 | assert result.equals(expected) |
| 1363 | |
| 1364 | |
| 1365 | def test_replace_with_mask_string_type(): |