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.
Add missing referenced_data_file field to v2 manifests #3953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing referenced_data_file field to v2 manifests #3953
Changes from all commits
fa2dafbFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to declare the record schema as v3 here, even though the write schema is v2. Otherwise,
referenced_data_filegets written as null. 😭this is because
DataFile.from_args()defaults to v3, but the writer uses position-based indexes unless we provide the record schema.In V2 schema,
referenced_data_fileshould be index 16 becausefirst_row_iddoesnt exist in V2.In V3 schema,
referenced_data_fileis index 17.Without
record_schema, the writer reads index 16 (first_row_id) instead of 17. Declaring v3 lets the existing field-ID projection handle this mapping.The getter also assumes index 17 and I dont want to add an if branch to the getter.
iceberg-python/pyiceberg/manifest.py
Lines 539 to 541 in 562d3af
This is an existing problem so I think the best way to resolve it is to have records retain their schema and use field IDs for access. On read, we should infer the schema from the file. On write, we should specify the version and let manifest IO handle the conversion.
We can do this as a follow up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracking in #3957
Uh oh!
There was an error while loading. Please reload this page.