()
| 2168 | |
| 2169 | |
| 2170 | def test_dictionary_from_boolean(): |
| 2171 | typ = pa.dictionary(pa.int8(), value_type=pa.bool_()) |
| 2172 | a = pa.array([False, False, True, False, True], type=typ) |
| 2173 | assert isinstance(a.type, pa.DictionaryType) |
| 2174 | assert a.type.equals(typ) |
| 2175 | |
| 2176 | expected_indices = pa.array([0, 0, 1, 0, 1], type=pa.int8()) |
| 2177 | expected_dictionary = pa.array([False, True], type=pa.bool_()) |
| 2178 | assert a.indices.equals(expected_indices) |
| 2179 | assert a.dictionary.equals(expected_dictionary) |
| 2180 | |
| 2181 | |
| 2182 | @pytest.mark.parametrize('value_type', [ |
nothing calls this directly
no test coverage detected