liveBook · Manning

Equality delete

As explained in Architecting an Apache Iceberg Lakehouse

An equality delete is a row-deletion representation that identifies records to remove by matching specified column values.

An equality delete represents rows to remove by specifying column values that match records across data files. It is a merge-on-read mechanism: changes are stored in delete files and applied when the table is queried, avoiding immediate rewrites of the affected data files. section 6.3.1

Use equality deletes with these architectural tradeoffs in mind:

  • Prefer them for flexible streaming and change-data-capture ingestion, where the writer may not know the physical file and row position. section 6.3.1
  • Expect higher read cost because query engines evaluate delete predicates against data during execution. section 6.3.1 section 10.1.4
  • Plan compaction and workload controls because accumulating equality delete files makes reconciliation harder and can degrade high-churn query performance. section 10.1.4
  • Compare engine support before standardizing: the supplied discussion identifies Apache Flink as supporting equality deletes, while Apache Spark currently supports position deletes. section 6.3.1

CDC-driven correction

A streaming CDC pipeline can write equality deletes for records identified by logical column values, then write replacement records as new data files. Queries reconcile the base files, delete files, and replacements into the current view. section 6.3.1

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.

Visualizes how delete files cause updated and deleted records in existing data files to be ignored while replacement records are written separately. section 6.3.1

How Architecting an Apache Iceberg Lakehouse covers it

How deep it goes
Explains predicate matching, merge-on-read reconciliation, engine support, read overhead, and compaction difficulty without detailing implementation procedures.
Examples
Uses streaming CDC, slowly changing dimensions, regulatory corrections, data subject erasure, and downstream synchronization as application examples.
What it assumes
Assumes familiarity with data files and row-level updates while defining merge-on-read, delete files, and predicate-based deletion.
What you can do after
Evaluate equality deletes against position deletes and copy-on-write for write throughput, read performance, engine support, and maintenance cost.
How it connects
Connects equality deletes to merge-on-read, position deletes, copy-on-write, CDC, compaction, and deletion vectors.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting an Apache Iceberg Lakehouse. The section links point to the parts of the book it draws on.