Skip to content

Add rename_view to REST Catalog#2149

Open
rambleraptor wants to merge 6 commits into
apache:mainfrom
rambleraptor:rename_view
Open

Add rename_view to REST Catalog#2149
rambleraptor wants to merge 6 commits into
apache:mainfrom
rambleraptor:rename_view

Conversation

@rambleraptor
Copy link
Copy Markdown
Collaborator

Rationale for this change

As part of #818, this adds rename_view support to the Iceberg REST Catalog.

The REST Catalog spec specifies that both rename_view and rename_table do not return anything. Currently, rename_table returns the table. I'm happy to change that API if we want, but it would technically be a breaking change.

Are these changes tested?

Added unit tests.

Are there any user-facing changes?

  • Added rename_view support to Iceberg REST Catalog.

@rambleraptor
Copy link
Copy Markdown
Collaborator Author

@Fokko @kevinjqliu mind taking a look when you can? thanks!

Comment thread pyiceberg/catalog/rest/__init__.py
@github-actions
Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions
Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@rambleraptor
Copy link
Copy Markdown
Collaborator Author

@geruh looks like you've been going through the View PRs. Mind taking a look at this one? Follows the others near-identically.

@rambleraptor
Copy link
Copy Markdown
Collaborator Author

@ebyhr can you take a look? You've been doing a lot of work around views lately.

Comment thread pyiceberg/catalog/rest/__init__.py
Comment thread pyiceberg/catalog/rest/__init__.py Outdated
Comment thread pyiceberg/catalog/__init__.py
Comment thread tests/catalog/test_rest.py
Comment thread tests/catalog/test_rest.py
@rambleraptor rambleraptor requested a review from ebyhr May 27, 2026 20:52
@rambleraptor
Copy link
Copy Markdown
Collaborator Author

@kevinjqliu @Fokko @geruh mind taking a look? This will help with all of the View work that's been done.



@pytest.mark.integration
def test_rest_rename_view(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to also include a cross namespace rename test for completeness?


@abstractmethod
def rename_view(self, from_identifier: str | Identifier, to_identifier: str | Identifier) -> None:
"""Rename a fully classified view name.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: fully qualified instead of fully classified?

raise NotImplementedError

@override
def rename_view(self, from_identifier: str | Identifier, to_identifier: str | Identifier) -> None:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the override decorator for load_namespace_properties was accidentally lost?

Comment thread pyiceberg/catalog/sql.py
if hasattr(self, "engine"):
self.engine.dispose()

def rename_view(self, from_identifier: str | Identifier, to_identifier: str | Identifier) -> None:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this missing the override decorator?

_handle_non_200_response(exc, {404: NoSuchViewError})

@retry(**_RETRY_ARGS)
def rename_view(self, from_identifier: str | Identifier, to_identifier: str | Identifier) -> None:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this missing an override decorator?

@kevinjqliu kevinjqliu added this to the PyIceberg 0.12.0 milestone Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants