Skip to content

feat!(catalog): adding support for purge_table#2232

Open
CTTY wants to merge 10 commits intoapache:mainfrom
CTTY:ctty/purge-table
Open

feat!(catalog): adding support for purge_table#2232
CTTY wants to merge 10 commits intoapache:mainfrom
CTTY:ctty/purge-table

Conversation

@CTTY
Copy link
Collaborator

@CTTY CTTY commented Mar 12, 2026

Which issue does this PR close?

What changes are included in this PR?

  • Add catalog/utils.rs to provide helpers to delete table data using file_io and table_metadata
  • Add new API purge_table to Catalog trait and add default implementation
  • Implement purge_table for S3TableCatalog and RestCatalog

Are these changes tested?

Added new tests in table_suite

@CTTY CTTY marked this pull request as ready for review March 18, 2026 22:35
@CTTY CTTY changed the title feat(catalog): adding support for purge_table feat!(catalog): adding support for purge_table Mar 18, 2026
@CTTY CTTY added the breaking label Mar 18, 2026
Copy link
Contributor

@blackmwk blackmwk left a comment

Choose a reason for hiding this comment

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

Thanks @CTTY for this pr, generally LGTM!

/// S3 Tables data is managed by the service, so this just delegates
/// to `drop_table`
async fn purge_table(&self, table: &TableIdent) -> Result<()> {
self.drop_table(table).await
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should throw error here. If s3table doesn't support purge, we should report it rather than silently fail

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

S3 Tables doesn't support purge=false, so drop_table and purge_table should behave the same.

The "correct" way would be throwing error in drop_table and I think that's too inconvenient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support purge_table in Catalog

3 participants