avison9 commented on issue #3744: URL: https://github.com/apache/iceberg-python/issues/3744#issuecomment-6742624368
Thanks for the detailed report and the self-contained reproduction, it made this quick to verify. This is fixed in **0.12.0** by #3293, which teaches `from_bytes` to decode bounds by their encoded length. 4-byte bounds are now read as `int`/`float` even when the current type is `long`/`double`, which is the approach you suggested. Every bound decode in `inspect` goes through that function, so all the metadata tables are covered. I ran your reproduction, extended to both promotions and to `entries`, `files`, `data_files`, `all_files`, and `all_data_files`: - on the commit just before #3293: all fail with `struct.error: unpack requires a buffer of 8 bytes` - on 0.12.0 / current `main`: all return the correct bounds (`1`/`2` for int→long, `1.5`/`2.5` for float→double) Upgrading to `pyiceberg>=0.12.0` should resolve it. No rewrite of the affected tables is needed. #3293 only added tests for the metrics evaluators, so I've opened #4314 with a regression test for the inspect path, so this can't silently come back. -- 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]
