hkad98 opened a new issue, #36589: URL: https://github.com/apache/arrow/issues/36589
### Describe the bug, including details regarding any error messages, version, and platform. When I am working with a table that has a field of dictionary type, I try to store it as a parquet using [write_table](https://arrow.apache.org/docs/python/generated/pyarrow.parquet.write_table.html) and then load it using [read_table](https://arrow.apache.org/docs/python/generated/pyarrow.parquet.read_table.html) I noticed that write_table does not respect dictionary indices type. Please take a look at the reproducer below. PyArrow: 12.0.1 Python: 3.11.1 Platform: MacOS, 13.4.1 (22F82) Reproducer: ```python import pyarrow as pa import pyarrow.parquet as pq table = pa.Table.from_arrays([["a", "b", None, "d"]], schema=pa.schema([pa.field("random",pa.dictionary(pa.int8(), pa.string()))])) """ pyarrow.Table random: dictionary<values=string, indices=int8, ordered=0> ---- random: [ -- dictionary: ["a","b","d"] -- indices: [0,1,null,2]] """ pq.write_table(table, "example.parquet") table_cpy = pq.read_table("example.parquet") """ pyarrow.Table random: dictionary<values=string, indices=int32, ordered=0> ---- random: [ -- dictionary: ["a","b","d"] -- indices: [0,1,null,2]] """ ``` ### Component(s) Parquet, 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]
