Skip to content

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

Merged
blackmwk merged 14 commits intoapache:mainfrom
CTTY:ctty/purge-table
Mar 25, 2026
Merged

feat!(catalog): adding support for purge_table#2232
blackmwk merged 14 commits intoapache:mainfrom
CTTY:ctty/purge-table

Conversation

@CTTY
Copy link
Copy Markdown
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

Comment thread crates/iceberg/src/catalog/utils.rs Outdated
Comment thread crates/iceberg/src/catalog/utils.rs Outdated
Comment thread crates/catalog/glue/src/catalog.rs Outdated
Comment thread crates/catalog/hms/src/catalog.rs Outdated
Comment thread crates/catalog/sql/src/catalog.rs Outdated
Comment thread crates/iceberg/src/catalog/memory/catalog.rs Outdated
Comment thread crates/iceberg/src/catalog/mod.rs Outdated
Comment thread crates/iceberg/src/catalog/mod.rs Outdated
Comment thread crates/iceberg/src/catalog/utils.rs Outdated
@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
Copy Markdown
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!

Comment thread crates/iceberg/src/catalog/utils.rs
Comment thread crates/catalog/s3tables/src/catalog.rs Outdated
Comment thread crates/iceberg/src/catalog/mod.rs Outdated
Comment thread crates/iceberg/src/catalog/utils.rs
Comment thread crates/catalog/s3tables/src/catalog.rs Outdated
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment thread crates/catalog/loader/tests/table_suite.rs
Copy link
Copy Markdown
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!

@blackmwk blackmwk merged commit 56fda82 into apache:main Mar 25, 2026
19 checks passed
@CTTY CTTY deleted the ctty/purge-table branch March 25, 2026 05:44
toutane pushed a commit to DataDog/iceberg-rust that referenced this pull request Apr 23, 2026
## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes apache#123` indicates that this PR will close issue apache#123.
-->

- Closes apache#2133

## 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

<!--
Provide a summary of the modifications in this PR. List the main changes
such as new features, bug fixes, refactoring, or any other updates.
-->

## Are these changes tested?
Added new tests in table_suite
<!--
Specify what test covers (unit test, integration test, etc.).

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->

(cherry picked from commit 56fda82)
toutane pushed a commit to DataDog/iceberg-rust that referenced this pull request Apr 23, 2026
## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes apache#123` indicates that this PR will close issue apache#123.
-->

- Closes apache#2133

## 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

<!--
Provide a summary of the modifications in this PR. List the main changes
such as new features, bug fixes, refactoring, or any other updates.
-->

## Are these changes tested?
Added new tests in table_suite
<!--
Specify what test covers (unit test, integration test, etc.).

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->

(cherry picked from commit 56fda82)
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