zeroshade commented on code in PR #2127:
URL: https://github.com/apache/iceberg-go/pull/2127#discussion_r4198583949
##########
name_mapping.go:
##########
@@ -202,30 +202,22 @@ func (u *updateNameMappingVisitor) Field(field
MappedField, fieldResult []Mapped
}
func (u *updateNameMappingVisitor) removeReassignedNames(field MappedField,
assignments map[string]int) *MappedField {
Review Comment:
Optional: this now compacts `field.Names` in place, which is only safe
because `Field` hands it a `slices.Clone` of the input names. Worth a short
comment so nobody later drops that clone (e.g. for fields that aren't being
renamed) without realizing this function depends on it.
```suggestion
// removeReassignedNames filters field.Names in place, so field must own its
// Names backing array. Field clones the input names to guarantee that.
func (u *updateNameMappingVisitor) removeReassignedNames(field MappedField,
assignments map[string]int) *MappedField {
```
--
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]