A position delete is an Iceberg delete record that identifies a row by its physical position within a data file. In merge-on-read, the delete file is applied during queries, so affected data files do not need immediate rewriting. This reduces write amplification and can improve ingestion throughput, but it adds read-time reconciliation and requires the writer to know exactly which rows to remove. section 6.3.1 section 10.1.4
Position deletes shape table architecture and operations in several ways:
- Resolve deletes efficiently at read time because engines can match file and row position directly. section 6.3.1 section 10.1.4
- Require precise row identification, making them less flexible than equality deletes for some streaming and CDC-style ingestion pipelines. section 6.3.1
- Accumulate delete-file work that can slow reads as queries merge base files with multiple layers of deletes. section 10.1.4
- Still leave deleted rows physically present until compaction, snapshot expiration, and orphan cleanup complete the deletion lifecycle. section 11.2.5
- Depend on engine capabilities: Apache Spark supports position deletes, while Apache Flink supports equality deletes. section 6.3.1
Merge-on-read deletion
A pipeline records the locations of rows to remove in a position-delete file instead of rewriting the entire data file. Queries read the base file and exclude those positions. Later compaction rewrites data without the deleted rows, while snapshot expiration and orphan cleanup remove no-longer-referenced files. section 6.3.1 section 11.2.5
Figure 6.9 When using delete files, updated and deleted records in existing data files are ignored, while new data files containing only the updated records are written.
Shows how delete files cause old records to be ignored while new data files hold updated records. section 6.3.1
