(arrow_type)
| 2152 | |
| 2153 | @pytest.mark.parametrize('arrow_type', numerical_arrow_types) |
| 2154 | def test_fill_null_chunked_array(arrow_type): |
| 2155 | fill_value = pa.scalar(5, type=arrow_type) |
| 2156 | arr = pa.chunked_array([pa.array([None, 2, 3, 4], type=arrow_type)]) |
| 2157 | result = arr.fill_null(fill_value) |
| 2158 | expected = pa.chunked_array([pa.array([5, 2, 3, 4], type=arrow_type)]) |
| 2159 | assert result.equals(expected) |
| 2160 | |
| 2161 | arr = pa.chunked_array([ |
| 2162 | pa.array([1, 2], type=arrow_type), |
| 2163 | pa.array([], type=arrow_type), |
| 2164 | pa.array([None, 4], type=arrow_type) |
| 2165 | ]) |
| 2166 | expected = pa.chunked_array([ |
| 2167 | pa.array([1, 2], type=arrow_type), |
| 2168 | pa.array([], type=arrow_type), |
| 2169 | pa.array([5, 4], type=arrow_type) |
| 2170 | ]) |
| 2171 | result = arr.fill_null(fill_value) |
| 2172 | assert result.equals(expected) |
| 2173 | |
| 2174 | # Implicit conversions |
| 2175 | result = arr.fill_null(5) |
| 2176 | assert result.equals(expected) |
| 2177 | |
| 2178 | result = arr.fill_null(pa.scalar(5, type='int8')) |
| 2179 | assert result.equals(expected) |
| 2180 | |
| 2181 | |
| 2182 | def test_fill_null_windows_regression(): |
nothing calls this directly
no test coverage detected