zeroshade commented on code in PR #1686:
URL: https://github.com/apache/iceberg-go/pull/1686#discussion_r3732111335
##########
table/update_schema.go:
##########
@@ -357,6 +357,10 @@ func (u *UpdateSchema) addColumn(path []string, fieldType
iceberg.Type, doc stri
}
u.adds[parentID] = append(u.adds[parentID], sch.Field(0))
u.addedNameToID[fullName] = sch.Field(0).ID
Review Comment:
Only the added root's name and ID are indexed here. If `fieldType` is a
struct/list/map, none of its freshly assigned descendants are entered in
`addedNameToID` or `parentID`, so `findFieldForMove` cannot resolve a move
within that newly added complex field. The analogous union path has the same
one-level indexing. **Suggested fix:** recursively index every added
descendant's full name and parent relationship, then apply moves inside the
staged complex field.
--
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]