steveis opened a new pull request, #2785:
URL: https://github.com/apache/iceberg-rust/pull/2785

   ## Which issue does this PR close?
   
   - Part of #2218 (commit-side complement of a `DeltaWriter`) and of #2186 
(merge-on-read support).
   
   ## What changes are included in this PR?
   
   Adds `Transaction::row_delta()`, the equivalent of iceberg-java's 
`Table.newRowDelta()`: a transaction action that commits data files and delete 
files (position or equality deletes) together in a single `overwrite` snapshot.
   
   - `RowDeltaAction` mirrors `FastAppendAction` and adds `add_delete_files()`.
   - `SnapshotProducer` gains `added_delete_files` and writes a deletes-content 
manifest alongside the data manifest (the `ManifestContentType::Deletes` 
builders already existed but had no producer).
   - Delete files are counted in the snapshot summary via the existing 
`SnapshotSummaryCollector` delete-file support.
   
   Semantics: both the added data files and the added delete files receive the 
new snapshot's sequence number, so per the spec the delete files apply only to 
strictly older data. Pairing an equality delete for a key with the key's new 
row therefore gives upsert semantics in one atomic commit — the standard shape 
for CDC producers.
   
   Context: this crate's read path already applies delete files; this PR adds 
the missing write/commit side. We use it in production-shaped testing in a 
Postgres→Iceberg CDC pipeline (sustained soaks of consecutive row-delta 
commits, differential-checked against Postgres), with the results read back by 
this crate and by iceberg-datafusion.
   
   ## Are these changes tested?
   
   Unit tests mirroring the fast-append suite (validation of content types, 
empty action, deletes-only commits, manifest contents and sequence numbers), 
plus an end-to-end merge-on-read round trip 
(`test_row_delta_write_and_read_back`): real parquet data written, an 
equality-delete upsert committed via `row_delta`, and the table scanned back 
through the crate's own reader, asserting the upserted values. `cargo test -p 
iceberg --lib` passes (1389 tests).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to