Casting between dictionary types isn't implemented. It leads to boilerplate code.
import pyarrow as pa
dt = pa.array([b"foo", b"bar", b"baz", b"bar", b"baz", b"bar"], type=pa.binary())
dictionary = dt.dictionary_encode()
print(dictionary.type)
# dictionary<values=binary, indices=int32, ordered=0>
pc.cast(dictionary, pa.dictionary(index_type=pa.int8(), value_type=pa.binary()), safe=False)
pyarrow.lib.ArrowNotImplementedError: Unsupported cast from dictionary<values=binary, indices=int32, ordered=0> to dictionary using function cast_dictionary
Reporter: Andrei Nesterov
Related issues:
Note: This issue was originally created as ARROW-13102. Please see the migration documentation for further details.
Casting between dictionary types isn't implemented. It leads to boilerplate code.
Reporter: Andrei Nesterov
Related issues:
Note: This issue was originally created as ARROW-13102. Please see the migration documentation for further details.