Skip to content

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

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

feat!(catalog): adding support for purge_table#2232
CTTY wants to merge 12 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!

async fn drop_table(&self, table: &TableIdent) -> Result<()> {
/// S3 Tables doesn't support soft delete, so dropping a table will permanently remove it from the catalog.
async fn drop_table(&self, _table: &TableIdent) -> Result<()> {
Err(Error::new(
Copy link
Member

Choose a reason for hiding this comment

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

harness.label
));

cleanup_namespace_dyn(catalog.as_ref(), &namespace).await;
Copy link
Member

Choose a reason for hiding this comment

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

Just a heads up but, looks like cleanup_namespace_dyn calls drop_table, and with the new logic from S3Tables we would get the unsupported exception. The error gets swallowed, but worth running with the S3Tables creds to make sure. Might also be worth switching cleanup to use purge instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! I think switching to use purge makes sense

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