Uh oh!
There was an error while loading. Please reload this page.
fix(inspect): handle 4-byte bounds in _readable_bound after int/float type promotion (#3744) - #3771
Open
ArjunPakhan wants to merge 2 commits into
Open
fix(inspect): handle 4-byte bounds in _readable_bound after int/float type promotion (#3744)#3771ArjunPakhan wants to merge 2 commits into
ArjunPakhan wants to merge 2 commits into
Conversation
Open
3 tasks
tasty0tomato
commented
Aug 8, 2026
Thanks for picking this up @ArjunPakhan! The diff here only contains Two notes for when it does:
Happy to test a revised branch against the S3 Tables table where I hit this. |
ArjunPakhan
commented
Aug 9, 2026
Author
Hi @tasty0tomato! 👋 Thanks for the thorough review! I've updated the PR branch:
All 18 CI checks have passed! Ready for review when you have a moment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#3744
Summary
When a table undergoes spec-allowed type promotion (
int→longorfloat→double), pre-existing manifest files retain their 4-byte bounds (IntegerType/FloatType). Currently,_readable_boundpasses these bytes directly tofrom_bytes(field.field_type, bound). Becausefield.field_typeis updated toLongType()/DoubleType(),from_bytesattempts an 8-byte unpack (_LONG_STRUCT.unpack(b)), raisingstruct.error: unpack requires a buffer of 8 bytes.Changes Made
_readable_boundinpyiceberg/table/inspect.pyto inspect byte lengths before decoding.field_typeisLongType/DoubleTypeandlen(bound) == 4, decode usingIntegerType()/FloatType().tests/table/test_inspect.pycovering promoted bound deserialization forLongTypeandDoubleType.Testing
python -m pytest tests/table/test_inspect.py(5/5 tests passed).