Skip to content

REST: Explicitly send purgeRequested=false when dropping table without purge#15164

Closed
hackintoshrao wants to merge 1 commit intoapache:mainfrom
hackintoshrao:fix/explicit-purge-false-parameter
Closed

REST: Explicitly send purgeRequested=false when dropping table without purge#15164
hackintoshrao wants to merge 1 commit intoapache:mainfrom
hackintoshrao:fix/explicit-purge-false-parameter

Conversation

@hackintoshrao
Copy link
Copy Markdown

Summary

Modify RESTSessionCatalog.dropTable() to explicitly send purgeRequested=false instead of omitting the parameter.

Problem

Currently, dropTable(context, identifier) sends a DELETE request without the purgeRequested parameter, relying on the server to default to false.

However, some catalogs default purgeRequested=true to work around Spark's bug where it doesn't forward purgeRequested=true even with DROP TABLE ... PURGE (#11023, #11317).

With such catalogs, calling catalog.dropTable(identifier, false) unexpectedly purges table data because the parameter is omitted and the server defaults to true.

Solution

Explicitly send purgeRequested=false:

client.delete(
    paths.table(identifier),
    ImmutableMap.of("purgeRequested", "false"),
    ...);

This ensures the client's intent is honored regardless of server defaults.

Related Issues

…t purge

The REST catalog client previously omitted the purgeRequested parameter
when calling dropTable with purge=false. This relied on the server
defaulting to purge=false.

However, some catalogs (e.g., MinIO AIStor) default purgeRequested to
true to work around Spark's bug where it doesn't forward purgeRequested=true
even when DROP TABLE ... PURGE is used.

With those catalogs, calling dropTable(identifier, false) would unexpectedly
purge the table data because the parameter was omitted and the server
defaulted to true.

This change explicitly sends purgeRequested=false to ensure the client's
intent is honored regardless of the server's default behavior.

Relates to: apache#11023
@github-actions github-actions Bot added the core label Jan 28, 2026
@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 github-actions Bot added the stale label Feb 28, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 7, 2026

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions Bot closed this Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant