We can optimally resolve conflicts between delete queries that affect different rows. We have the facility for this already tested for merge_insert and update. We want to do the same for updates.
In update queries, we do this by passing the row addresses that have been deleted (in Lance, updates are implemented as "delete + append") via the with_affected_rows method on CommitBuilder:
https://github.com/lancedb/lance/blob/0fad40d676b24d9355a6b2dbe626111684f1696a/rust/lance/src/dataset/write/update.rs#L397-L401
This is later handled in TransactionRebase under conflict_resolver.rs. Deletes look to already by handled here, so it's possible no additional changes are needed in that file.
TODO: (A TDD approach:)
We can optimally resolve conflicts between delete queries that affect different rows. We have the facility for this already tested for merge_insert and update. We want to do the same for updates.
In update queries, we do this by passing the row addresses that have been deleted (in Lance, updates are implemented as "delete + append") via the
with_affected_rowsmethod onCommitBuilder:https://github.com/lancedb/lance/blob/0fad40d676b24d9355a6b2dbe626111684f1696a/rust/lance/src/dataset/write/update.rs#L397-L401
This is later handled in
TransactionRebaseunderconflict_resolver.rs. Deletes look to already by handled here, so it's possible no additional changes are needed in that file.TODO: (A TDD approach:)
with_affected_rows.