Respect REST endpoint capabilities when checking view existence - #3960
Open
kevinjqliu wants to merge 6 commits into
Open
kevinjqliu wants to merge 6 commits into
kevinjqliu wants to merge 6 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kevinjqliu
requested review from
Fokko and
geruh
and
a lite review from Copilot
September 13, 2026 23:48
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved issues were identified, and the focused test suite passes.
Pull request overview
Updates RestCatalog.view_exists() to use GET fallback when the REST server does not support the view HEAD endpoint.
Changes:
- Added capability-aware view existence checks.
- Added regression tests for advertised, legacy, and missing-view scenarios.
File summaries
| File | Description |
|---|---|
tests/catalog/test_rest.py |
Adds fallback behavior regression tests. |
pyiceberg/catalog/rest/__init__.py |
Implements capability-aware view existence checks. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
rambleraptor
approved these changes
Sep 14, 2026
rambleraptor
left a comment
Collaborator
There was a problem hiding this comment.
Double checked on Java and this is how it's handled there too. Thanks for doing this!
ebyhr
approved these changes
Sep 14, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Rationale for this change
Make
RestCatalog.view_exists()fall back toload_view()when the server does not advertise the view HEAD endpoint, following the existingRestCatalog.table_exists()fallback and namespace existence checks. Preserve advertised HEAD behavior and existing capability defaults.Are these changes tested?
Added separate regressions for advertised GET support, legacy servers with view support enabled, and missing views. The focused REST/view suite passes: 44 tests. Ruff, mypy, and applicable commit hooks pass.
Are there any user-facing changes?
view_exists()works with GET-capable servers that do not advertise HEAD. Missing views returnFalse; other load errors propagate.