{{ message }}
Bug Fix: metadata_location to be optional in TableResponse#1321
Merged
Conversation
metadata_location optional metadata_location to be optional in TableResponse
Fokko
approved these changes
Nov 14, 2024
Fokko
left a comment
Contributor
There was a problem hiding this comment.
Hey @sungwy this is a great catch! Since @kevinjqliu is the release manager, we can either follow up with this in 0.8.1 or cut another RC with this fix included.
I think it would be good to have a test to cover this. It should be pretty straightforward by adding another fixture that covers this case:
https://github.com/apache/iceberg-python/blob/2ba86b5c852cb0c8f4b4ba95d54fb5a6bfa00fa2/tests/catalog/test_rest.py#L70-L79
WDYT?
Collaborator
Author
kevinjqliu
reviewed
Nov 14, 2024
kevinjqliu
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Lets cut another RC for this
Collaborator
Author
There was a problem hiding this comment.
good question - I'll get it removed
kevinjqliu
approved these changes
Nov 14, 2024
sungwy
added a commit
to sungwy/iceberg-python
that referenced
this pull request
Dec 7, 2024
…e#1321) * make metadata_location optional * add test for staged creation * revert * revert from testing
sungwy
added a commit
to sungwy/iceberg-python
that referenced
this pull request
Dec 7, 2024
…e#1321) * make metadata_location optional * add test for staged creation * revert * revert from testing
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.

While testing out the iceberg-rest-catalog docker image, I ran into the following error when parsing the following example TableResponse that is created in
tests/integration/test_writes/test_writes.py::test_create_table_transaction[session_catalog-2]Error trace
The following is noted from pydantic docs:
@kevinjqliu I think this is a bug that we should consider in cutting out a new RC for the ongoing 0.8.0 release. The implication of not fixing this bug, is that TableResponse from staged tables cannot be parsed by PyIceberg and will lead to a fatal exception :(
According to the Iceberg Rest Catalog Spec, the metadata-location is an optional field, and may be absent from the TableResponse
https://github.com/apache/iceberg/blob/3659ded18d50206576985339bd55cd82f5e200cc/open-api/rest-catalog-open-api.yaml#L3201-L3208