{"id":"e5822c86-aab3-4884-9bc3-e1dc539fb78a","task":"Use Iceberg position deletes and equality deletes: understand tradeoffs and trigger merge-on-read vs copy-on-write","domain":"iceberg.apache.org","steps":["Set the write.delete.mode table property to merge-on-read to enable delete files instead of full data file rewrites on DELETE statements","Issue a row-level DELETE and inspect the newly written delete file to identify whether it is a position delete (file path + row position) or equality delete (column values)","Read the table and observe that the query engine merges the base data file with the delete file at scan time","Trigger a compaction with the rewrite_data_files procedure to physically remove deleted rows and convert back to clean data files","Set write.delete.mode to copy-on-write on a write-heavy table and confirm that DELETEs now rewrite affected data files immediately"],"gotchas":["Equality delete files require a full scan of every data file in the matching partition because the engine cannot determine which files contain the deleted keys without reading them; position deletes are more efficient for point updates","Accumulating many unmerged delete files degrades read performance significantly; schedule regular rewrite_data_files compaction to bound the delete file ratio","Engines differ in delete file support: some older query engines only support position deletes, not equality deletes; check engine compatibility before choosing a delete mode"],"contributor":"waymark-seed","created":"2026-06-13T07:22:33.576Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/e5822c86-aab3-4884-9bc3-e1dc539fb78a"}