I was able to reproduce it too, so I tried a few variations:
I reproduced the same TypeError: 'dict' object is not callable on Datasets 5.2.0, PyArrow 24.0.0 and Polars 1.35.2. The normal decoded-image row and batch reads failed on both Dataset and IterableDataset; consuming the eager image column worked. Plain text, Python, full pandas and raw-image controls succeeded.
The fixes #8402 and #9156 are complementary: select the actual columns to decode, then choose an output type. Both combined shapes covered the selected Polars read cases. #8403 fixes a separate pandas projection issue.
One more distinction matters for users of the integration: successful PIL-image reads do not imply safe Arrow writeback. Returning a decoded DataFrame from a batched map produced eight-byte binary values in place of the original image storage; returning just a dictionary of the new columns also lost the existing columns in the table-format cases I tried.
| Goal | Route |
|---|---|
| Work only on ordinary columns | Actual select_columns , not just the format’scolumns= . |
| Add a column without changing images | Python-format map, or a separate Polars calculation followed by checked add_column . |
| Read PIL images | Python format, or a checked decoded formatter. |
| Process encoded storage | Raw export or Image(decode=False) ; preserve Features when reconstructing. |
| Modify images in a returned table | Explicit image encoding and compatible output Features. |
The first two routes worked on the unmodified release. When images need not change, keep their storage rather than decode and re-encode just to calculate another column.
- Independent reproduction and the read paths