Skip to content

fix: serialize purgeRequested as lowercase boolean in REST drop_table - #3881

Open
edith007 wants to merge 1 commit into
apache:mainfrom
edith007:fix/drop-table-purge-requested-bool
Open

fix: serialize purgeRequested as lowercase boolean in REST drop_table#3881
edith007 wants to merge 1 commit into
apache:mainfrom
edith007:fix/drop-table-purge-requested-bool

Conversation

@edith007

Copy link
Copy Markdown

Problem

RestCatalog.drop_table() passed a Python bool as a query param. requests serializes True/False as "True"/"False", which is invalid for OpenAPI type: boolean query parameters and causes 400s on strict REST catalogs (e.g. Aliyun OSS Tables).

Solution

Serialize explicitly as lowercase "true" / "false".

Test plan

  • added unit test asserting query string is purgeRequested=true|false
  • pytest tests/catalog/test_rest.py -k "drop_table_serializes_purge or delete_table_204"

Fixes #3836

requests stringifies Python True/False as "True"/"False", which breaks
OpenAPI boolean query params on strict REST catalogs.

Fixes apache#3836

@ebyhr ebyhr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • The issue author already submitted a PR #3837

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.

[Bug] REST catalog drop_table serializes purgeRequested as "True" instead of "true"

2 participants