Skip to content

Add equality-delete reads and atomic upserts - #1

Closed
nicosuave wants to merge 6 commits into
mainfrom
feature/equality-delete-read-write
Closed

Add equality-delete reads and atomic upserts#1
nicosuave wants to merge 6 commits into
mainfrom
feature/equality-delete-read-write

Conversation

@nicosuave

Copy link
Copy Markdown
Member

Summary

  • index equality deletes during scan planning with sequence, partition, schema-evolution, null, and bounds semantics
  • apply equality deletes to Parquet and ORC Arrow scans with field-ID alignment, hidden key projection, and record-batch anti-joins
  • write Iceberg v2 equality-delete files and commit delete/data manifests in one row-delta snapshot
  • add Table.upsert_by_equality_delete, including delete-only keys for atomic hard deletes
  • encode equality field IDs with the Iceberg-compatible Avro int wire type

This is a Sidequery fork review PR. It does not open or modify an Apache pull request. The implementation incorporates correctness cases discussed around apache/iceberg-python#3805 while adding the write path needed by dlt-iceberg.

Semantics and current limits

  • Snapshot visibility is atomic; physical files written before a failed metadata commit may require orphan-file cleanup.
  • Concurrent commits are ordered by snapshot sequence: later equality deletes can hide earlier matching rows, while later data survives.
  • Writes require Iceberg v2+, reject nested equality fields, and require partition source columns in the equality key.
  • Evolved partition specs are rejected for equality-delete upserts.
  • Reads anti-join per record batch, but equality-delete files are still cached in memory for a scan; this reduces data-file amplification but is not yet a spilling execution backend.

Validation

  • full hooks: passed
  • unit suite before the final delete-only API addition: 3,970 passed, 3 skipped
  • focused upsert suite after the final addition: 29 passed
  • local composite merge: 15,000 source rows passed
  • Docker REST/MinIO/Spark interoperability: 200,000 source rows, 300,000 final rows passed
  • additional local stress proof: 750,000 source rows into a 1,000,000-row table, 1,250,000 final rows passed

@nicosuave
nicosuave force-pushed the feature/equality-delete-read-write branch from cbbd265 to 968fb96 Compare August 18, 2026 03:23
@nicosuave nicosuave closed this Aug 18, 2026
@nicosuave
nicosuave deleted the feature/equality-delete-read-write branch August 18, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant