Describe the bug, including details regarding any error messages, version, and platform.
If you define a dictionary type to use an unsigned integer for its index type, and explicitly pass it to pyarrow.array, it'll get ignored and you'll find yourself with a signed index instead.
import pyarrow as pa
dictionary_type = pa.dictionary(pa.uint64(), pa.string())
print(pa.array(['x'], dictionary_type).type)
# dictionary<values=string, indices=int64, ordered=0>
Similarly for uint32:
import pyarrow as pa
dictionary_type = pa.dictionary(pa.uint32(), pa.string())
print(pa.array(['x'], dictionary_type).type)
# dictionary<values=string, indices=int32, ordered=0>
Component(s)
Python
Describe the bug, including details regarding any error messages, version, and platform.
If you define a dictionary type to use an unsigned integer for its index type, and explicitly pass it to pyarrow.array, it'll get ignored and you'll find yourself with a signed index instead.
Similarly for
uint32:Component(s)
Python