| 2180 | |
| 2181 | |
| 2182 | def test_fill_null_windows_regression(): |
| 2183 | # Regression test for GH-47234, which was failing due to a MSVC compiler bug |
| 2184 | # (possibly https://developercommunity.visualstudio.com/t/10912292 |
| 2185 | # or https://developercommunity.visualstudio.com/t/10945478) |
| 2186 | arr = pa.array([True, False, False, False, False, None]) |
| 2187 | s = pa.scalar(True, type=pa.bool_()) |
| 2188 | |
| 2189 | result = pa.compute.call_function("coalesce", [arr, s]) |
| 2190 | result.validate(full=True) |
| 2191 | expected = pa.array([True, False, False, False, False, True]) |
| 2192 | assert result.equals(expected) |
| 2193 | |
| 2194 | for ty in [pa.int8(), pa.int16(), pa.int32(), pa.int64()]: |
| 2195 | arr = pa.array([1, 2, 3, 4, 5, None], type=ty) |
| 2196 | s = pa.scalar(42, type=ty) |
| 2197 | |
| 2198 | result = pa.compute.call_function("coalesce", [arr, s]) |
| 2199 | result.validate(full=True) |
| 2200 | expected = pa.array([1, 2, 3, 4, 5, 42], type=ty) |
| 2201 | assert result.equals(expected) |
| 2202 | |
| 2203 | |
| 2204 | def test_logical(): |