Revanth14 commented on code in PR #2239:
URL: https://github.com/apache/iceberg-go/pull/2239#discussion_r4328617485
##########
table/transaction.go:
##########
@@ -1732,6 +1745,15 @@ func (t *Transaction) ReplaceDataFilesWithDataFiles(ctx
context.Context, filesTo
return errors.New("cannot delete files that do not belong to
the table")
}
+ // On v3 every removed file takes its deletion vector with it.
+ // DVs only exist from v3, so v2 skips the read.
+ var dvs liveDeletionVectors
+ if meta.formatVersion >= 3 {
Review Comment:
`markedForDeletion` can't be empty at that point: the function returns early
when `filesToDelete` is empty, and the count check just above makes
`markedForDeletion` match `setToDelete` one for one. `ReplaceDataFiles` needs
the guard because it falls through when both lists are empty. Happy to add it
for symmetry if you'd prefer it explicit.
--
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]