Repository navigation
feat(rest): preserve column bounds and key metadata during REST scan planning - #4544
Open
SurenderguliaEnginner wants to merge 2 commits into
Open
SurenderguliaEnginner wants to merge 2 commits into
SurenderguliaEnginner wants to merge 2 commits into
Conversation
…planning Signed-off-by: Surender Gulia <[email protected]>
Signed-off-by: Surender Gulia <[email protected]>
SurenderguliaEnginner
force-pushed
the
fix/4528-rest-scan-planning-metadata
branch
from
December 1, 2026 10:56
eddc546 to
c61e652
Compare
This branch has not been deployed
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 free
to 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.
Description
When a REST catalog plans a scan server-side, the server can return per-column lower and upper bounds (
lower-bounds,upper-bounds) and encryption key metadata (key-metadata) on each data file. Previously,_rest_file_to_data_fileinpyiceberg/table/__init__.pydid not pass these fields toDataFile.from_args(), causing the convertedDataFileto always drop column bounds and key metadata.This caused two main issues:
Changes:
pyiceberg/table/__init__.py:_serialize_boundshelper usingpyiceberg.conversions.to_bytesand field types fromtable_schema.key_metadatafrom base64 string to bytes viabase64.b64decode(validate=True)(consistent withtable/metadata.py).lower_bounds,upper_bounds, andkey_metadatatoDataFile.from_args().table_schemathroughFileScanTask.from_rest_responseandDataScan._plan_files_server_side.pyiceberg/catalog/rest/__init__.py:table_schemathrough_plan_scan_resultand_expand_plan_tasksintoFileScanTask.from_rest_response.tests/catalog/test_scan_planning_models.py:test_rest_task_preserves_bounds_and_key_metadatato verify bounds serialization and key metadata decoding.Closes #4528
Tests
pytest tests/catalog/test_scan_planning_models.py(63 passed)