spenczar opened a new issue, #37476:
URL: https://github.com/apache/arrow/issues/37476

   ### 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.
   
   ```py
   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`:
   ```py
   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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to