You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/01/05 00:41:03 UTC

[GitHub] [iceberg] rdblue commented on pull request #3844: Core: Add truncate table API and support fast truncate table

rdblue commented on pull request #3844:
URL: https://github.com/apache/iceberg/pull/3844#issuecomment-1005283192


   Thanks, @smallx! This looks good and I can certainly see the desire for a quick truncate operation. The main problem is that Iceberg normally writes a delete entry for each data file that is deleted, so that snapshot expiration can clean them up. The snapshot expiration action would still work without those entries because it compares all of the reachable files in the metadata tree, but `table.expireSnapshots().commit()` would leak files if you used this. That's probably why the "fast" truncate is optional, right?
   
   As for the implementation, what about making this part of the `DeleteFiles` API? You could add a `truncate` method there and detect when deleting with a `true` filter. Then this wouldn't need to add to the `Table` interface, which is already quite large.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org