hedger9487 opened a new pull request, #3841: URL: https://github.com/apache/iceberg-python/pull/3841
### Description Fixes #3633. When PyArrow tables containing dictionary-encoded columns (`pa.DictionaryArray`) are passed to Iceberg partition transforms (such as `BucketTransform`, `TruncateTransform`, or time transforms), `_pyiceberg_transform_wrapper` forwards the `DictionaryArray` directly to `pyiceberg_core.transform`, raising `ValueError: Feature Unsupported => Unsupported data type for bucket transform: Dictionary(Int64, Utf8)`. This PR updates `_pyiceberg_transform_wrapper` to normalize dictionary-encoded arrays via `arr.dictionary_decode()` before invoking `transform_func`, allowing all partition transforms to transparently handle dictionary-encoded PyArrow arrays and chunked arrays. ### Testing - Added `test_pyarrow_transforms_dictionary_encoded` in `tests/test_transforms.py` covering `DictionaryArray` and `ChunkedArray` on `BucketTransform` and `TruncateTransform`. - All 284 transform tests pass locally. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
