Queries for UPDATE/DELETE in specification? #242
-
The specification documents queries used on metadata database for reading and writing data with creating table and inserting data, but what about UPDATE and DELETE operations? How metadata is updated in such operations? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
A
|
Beta Was this translation helpful? Give feedback.
-
Fantastic! Was looking for that information only. I think this details should be added in to the specification documentation. Specification also lacks few important details, like how ACID is guaranteed. Also how small file problem is avoided, and how merge operations are reflected in metadata store. I am assuming this all works similar to iceberg, or are there going to be any difference? (except metadata is in a SQL db) |
Beta Was this translation helpful? Give feedback.
A
DELETE
operation in ducklake involves creating a delete file on object storage that specifies which rows of the data file is to be ignored. So the query for updating the metadata is done by updating theducklake_delete_file
table to point to the new delete file, updating theducklake_table_stats
andducklake_table_column_stats
if there are any changes to the table statistics, and updating theducklake_snapshot
andducklake_snapshot_changes
tables to create the new snapshot information.UPDATE
operations in lakehouse systems dont exist as the data files are immutable by design. So anUPDATE
operation in ducklake is actually implemented as aDELETE
+INSERT
operation where you delete the …