-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
Description
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_dictionaryReporter: Andrei Nesterov
Related issues:
- [C++] Casting dictionary type to use different index type (is a clone of)
- [C++][Python] Allow to specify a dictionary type for dictionary_encode() function (is related to)
Note: This issue was originally created as ARROW-13102. Please see the migration documentation for further details.