dhananjaykrutika commented on code in PR #679:
URL: https://github.com/apache/iceberg-go/pull/679#discussion_r2700495997
##########
table/transaction.go:
##########
@@ -275,7 +275,10 @@ func (t *Transaction) ExpireSnapshots(opts
...ExpireSnapshotsOpt) error {
}
}
- updates = append(updates, NewRemoveSnapshotsUpdate(snapsToDelete))
+ // Only add the update if there are actually snapshots to delete
+ if len(snapsToDelete) > 0 {
+ updates = append(updates,
NewRemoveSnapshotsUpdate(snapsToDelete))
+ }
return t.apply(updates, reqs)
Review Comment:
tx.Commit() does check the length of updates before calling table commit &
post-commit ops. See
https://github.com/apache/iceberg-go/blob/main/table/transaction.go#L551
--
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]