MCPcopy Create free account
hub / github.com/apache/arrow / test_fill_null_windows_regression

Function test_fill_null_windows_regression

python/pyarrow/tests/test_compute.py:2182–2201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2180
2181
2182def 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
2204def test_logical():

Callers

nothing calls this directly

Calls 4

equalsMethod · 0.80
arrayMethod · 0.45
scalarMethod · 0.45
validateMethod · 0.45

Tested by

no test coverage detected