Repository navigation
Serialize purgeRequested as a lowercase boolean in REST drop_table - #4341
Merged
kevinjqliu merged 2 commits intoNov 11, 2026
Merged
kevinjqliu merged 2 commits into
kevinjqliu merged 2 commits into
Conversation
kevinjqliu
approved these changes
Nov 11, 2026
kevinjqliu
left a comment
Contributor
There was a problem hiding this comment.
LGTM
good catch.
heres the rest spec reference: https://github.com/apache/iceberg/blob/014b3ce5ffbf7c1c51dabb144f4d94e45addcd88/open-api/rest-catalog-open-api.yaml#L1298-L1304
…rge_table Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
|
i pushed a change to consolidate the tests based on my agent's suggestion 😄 |
kevinjqliu
enabled auto-merge
November 11, 2026 17:53
rambleraptor
approved these changes
Nov 11, 2026
rambleraptor
left a comment
Collaborator
There was a problem hiding this comment.
I had approved #3837 which it looks like was closed by the stale bot. This looks like the equivalent. Thanks for doing this!
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 #3836
Rationale for this change
RestCatalog.drop_tablepassed thepurge_requestedboolean directly into therequestsquery params, andrequestsserializesTrueas"True". The REST catalog spec definespurgeRequestedas a boolean query parameter, so spec-compliant servers reject the capitalized form with400 Bad Request(for example OSS Tables, which only supports dropping tables with purge enabled).This sends the spec-compliant lowercase
"true"/"false"explicitly, matching how the other query parameters in the REST client are serialized.purge_tablegoes through the same code path.Are these changes tested?
Two regression tests in
tests/catalog/test_rest.pyassert the exact query string on the wire forpurge_requested=Trueand for the defaultFalse. The assertion is on the raw request URL rather thanrequest.qsbecauserequests_mocklowercases parsed query values, which would hide the bug.tests/catalog/test_rest.pypasses (192 tests) andprek runis clean on the changed files (ruff, ruff-format, mypy, codespell).Are there any user-facing changes?
RestCatalog.drop_tableandpurge_tablenow serializepurgeRequestedas a lowercase boolean, fixing 400 responses from servers that validate the parameter strictly.