wgtmac commented on PR #919:
URL: https://github.com/apache/iceberg-cpp/pull/919#issuecomment-7165191448

   What use case do we have in mind for `PositionDeleteUpdate`? For an engine 
that obtains `(path, pos)` from a scan, the existing C++ APIs already fit 
together fairly directly:
   
   - In v2, group positions by data file, sort them, and pass them to 
`PositionDeleteWriter::WriteDelete`.
   - In v3, pass the file’s spec and partition to `DVWriter::Delete`. Its 
`load_previous_deletes` callback can use `DeleteLoader` with the position 
delete files already attached to the scan task. `DVWriter::Metadata()` then 
tells the caller which files to add and which old delete entries to remove.
   - In both cases, commit through `RowDelta`, using `ValidateFromSnapshot` 
with the snapshot the engine actually read and `ValidateDataFilesExist` for the 
referenced files. This is also how the Java Spark integration composes its 
writers and `RowDelta`.
   
   That lets the engine reuse its original scan tasks, read prior deletes with 
the scan’s `FileIO`, and validate against the same snapshot that produced the 
row positions. The proposed `(path, pos)` interface drops that context, so 
`Commit()` has to plan another scan. With REST planning, that second scan can 
resolve against a different snapshot, and the current implementation also loses 
the scan-scoped credentials when it reads prior deletes.
   
   Given that, I’d prefer to hold this PR until there is a clear use case.


-- 
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