Repository navigation
REST: Preserve view metadata location - #4088
Open
Soumo-git-hub wants to merge 1 commit into
Open
Soumo-git-hub wants to merge 1 commit into
Soumo-git-hub wants to merge 1 commit into
Conversation
rambleraptor
approved these changes
Oct 7, 2026
rambleraptor
left a comment
Collaborator
There was a problem hiding this comment.
This looks great! Thanks for contributing this fix!
ebyhr
approved these changes
Oct 8, 2026
| _identifier: Identifier | ||
| metadata: ViewMetadata | ||
| config: dict[str, str] | ||
| metadata_location: str | None |
Member
There was a problem hiding this comment.
nit: The REST spec marks metadata-location as required, but ViewResponse already makes it optional, so str | None is consistent. Could we document when it's None?
|
|
||
| def __eq__(self, other: Any) -> bool: | ||
| """Return the equality of two instances of the View class.""" | ||
| return self.name() == other.name() and self.metadata == other.metadata if isinstance(other, View) else False |
Member
There was a problem hiding this comment.
nit: __eq__ ignores metadata_location. That seems intentional, but a short comment saying so might be helpful.
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.
Closes #4073
Rationale for this change
REST view responses include
metadata-location, but PyIceberg currently drops this value when constructing aView. As a result, callers cannot access the metadata file location returned by the REST catalog.This change preserves the response value on
View.metadata_location.What changed
metadata_locationattribute toViewwhile preserving the existing constructor argument order.ViewResponse.metadata_locationthroughRestCatalog._response_to_view.create_view,load_view, and the sharedregister_viewresponse path.Are these changes tested?
Yes.
python -m pytest tests/catalog/test_rest.py -m unit -v -p no:cacheprovider -k "test_create_view_200 or test_load_view_200 or test_register_view_200"— 3 passedpython -m pytest tests/catalog/test_rest.py -m unit -v -p no:cacheprovider— 167 passedAre there any user-facing changes?
Yes.
Viewnow exposes the metadata location returned by the REST catalog throughView.metadata_location.