zeroshade commented on code in PR #2680:
URL: https://github.com/apache/iceberg-go/pull/2680#discussion_r4722089316
##########
table/conflict_validation.go:
##########
@@ -523,8 +538,7 @@ func (c *conflictContext) forEachEntryInSnapshot(
// so attribution uses the entry snapshot ID instead of the manifest snapshot
ID.
func (c *conflictContext) forEachAddedEntry(content iceberg.ManifestContent,
visit func(Snapshot, iceberg.ManifestEntry) error) error {
for _, snap := range c.concurrent {
- if err := c.forEachEntryInSnapshot(snap, content,
- func(status iceberg.ManifestEntryStatus) bool { return
status == iceberg.EntryStatusADDED }, visit); err != nil {
+ if err := c.forEachEntryInSnapshot(snap, content /*
includeAdded */, true /* includeDeleted */, false, visit); err != nil {
Review Comment:
Nit: the flag comments sit one argument too late. `true /* includeDeleted
*/` reads as if `includeDeleted` is `true`, but here `true` is `includeAdded`.
Putting each comment before its value fixes this; the same applies at L557 and
L562:
```suggestion
if err := c.forEachEntryInSnapshot(snap, content, /*
includeAdded */ true, /* includeDeleted */ false, visit); err != nil {
```
--
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]