Repository navigation
Deprecate the rename_table return value - #4550
Closed
Anurag-S1ngh wants to merge 3 commits into
Closed
Anurag-S1ngh wants to merge 3 commits into
Anurag-S1ngh wants to merge 3 commits into
Conversation
Renaming a table is a mutation, and every implementation reloaded the table only to return it. Drop the reload and the return value as part of the v1 breaking changes.
Contributor
|
Let's not change the API without a warning: https://py.iceberg.apache.org/how-to-release/#remove-deprecated-apis |
Contributor
|
Wrong button, sorry! |
This reverts commit d90d418.
Keep returning the renamed Table for now and warn that it becomes None in 1.0.0, following the release deprecation process. The API removal stays in the v1 breaking changes.
Contributor
|
I'm going to close this one. I don't think this solves a real issue that we're having, while the deprecationg warning will trigger on each |
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.
Part of #3542
Rationale for this change
rename_tablereturns the reloadedTable, but callers rarely use it and the reload adds catalog requests to every rename. Removing the return value now would be a breaking change.Instead, emit a deprecation warning and keep the current return value until 1.0.0. The actual removal stays in #3542 for the next major release, following the release deprecation process.
Are these changes tested?
pytest tests/catalog/test_catalog_behaviors.py -k rename_table(135 passed)pytest tests/catalog/test_rest.py tests/catalog/test_sql.py tests/catalog/test_glue.py tests/catalog/test_dynamodb.py(335 passed)pytest tests/catalog/test_hive.py -k rename_table(5 passed)Tableruff checkandruff format --checkon the changed filesAre there any user-facing changes?
rename_tablenow emits aDeprecationWarningsaying the returnedTablewill beNonein 1.0.0. The current behavior is unchanged.