-
Notifications
You must be signed in to change notification settings - Fork 180
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
Bug Fix: metadata_location
to be optional in TableResponse
#1321
Conversation
metadata_location
optional metadata_location
to be optional in TableResponse
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.
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?
Just a test for testing the creation of a staged table @Fokko - thank you for the suggestion!
And yes, I agree it'll be fine either way. I'll leave it up to the captain 🚢 |
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.
LGTM! Lets cut another RC for this
iceberg
Outdated
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.
nit: whats this?
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.
good question - I'll get it removed
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