feat: support truncate table api#5604
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This isn't true; if you delete an entire fragment it is removed from the list. If you delete all rows, all fragments are removed. So this is just equivalent to Footnotes |
|
Hi, thanks a lot for your attention @wjones127 ! The addition of support for Of course, As u mentioned, Lance users can also use |
|
Okay, I get that it's a more familiar API. Could you change the implementation to just be a simple wrapper around |
Sure thing. Changed. PTAL ~ |
|
Hi @wjones127 would u mind to take another look? Thanks :) I have finished that |
Semantics - Introduces **truncate table** to create a new snapshot version whose manifest has no fragments while preserving the existing schema and table config. - Acts as an overwrite-style commit for the latest version; does not physically delete historical data files. - After truncation, new data can be appended or the table can be restored to previous versions. Differences vs Delete Rows - Delete Rows: - Soft-deletes rows by writing deletion files/vectors; existing fragments remain - Truncate Table: - Replaces the current version with an “empty fragments” version; no deletion files are produced and current-version fragments are not carried forward. ``` Rust: ds.truncate_table().await.unwrap(); Python: ds.truncate_table() Java: ds1.truncateTable() ``` --------- Co-authored-by: Will Jones <willjones127@gmail.com>
Semantics
Differences vs Delete Rows