Closed
Description
Describe the bug
I noticed that the current implementation of dropTableWithPurge
doesn’t delete snapshots. I took a look into the TaskExecution
, TableCleanupTaskHandler
, ManifestFileCleanupTaskHandler
, and it appears that only the metadata JSON files, manifest files, and data files are removed.
To Reproduce
- Launch Polaris locally
- Create a Polaris catalog: polaris_catalog
- Configure Spark to connect to the local Polaris instance
- Create a namespace:
create namespace ns;
- Create an Iceberg table:
create table ns.t1 (id INT, name STRING);
- Insert some data into it:
insert into ns.t1 values(1, 'XJKDC')
- Do drop table with purge:
drop table ns.t1 purge;
- Check the s3 bucket to see if there are some manifest lists file remaining.
Actual Behavior
The snapshots files (manifest list files) are not deleted.
Expected Behavior
The table location should not have any files in it after we drop the table with purge.
Additional context
Introduced in this PR: #312
System information
MacOS
Lastest Polaris