Replace predicate merges with equality-delete row deltas - #25
Closed
nicosuave wants to merge 5 commits into
Closed
Conversation
nicosuave
force-pushed
the
fix/equality-delete-upsert
branch
from
August 18, 2026 03:24
e7f7805 to
a8965ff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
968fb967, including equality-delete planning, Arrow reads, writes, and delete-only keysmerge_batch_sizeoption is accepted but ignoredThis supersedes the batching approach from closed PR #24. The merge size is no longer governed by an arbitrary row count.
Why
The previous paths generated a large
OR(AND(...), ...)expression for composite delete-insert and PyIceberg upsert generated match predicates while scanning/re-writing target data. Production observed a nativeSIGBUSaround 1,018 composite-key rows with PyIceberg 0.11.1 on macOS arm64. Making the batches smaller only avoided the failure and weakened snapshot atomicity; it did not fix the merge design.The new path writes the incoming keys as Iceberg v2 equality-delete files and appends replacement data in the same row-delta snapshot. Work grows with key data and files rather than expression-tree size, and no target-table scan is required to construct the commit.
Atomicity and compatibility
pyiceberg-core0.10.1. dlt-iceberg already requires Python 3.11+.Validation
uv run pytest tests/ -q: 190 passedmerge_batch_size=1to verify it has no effect