ShivamSharma43 commented on code in PR #2646:
URL: https://github.com/apache/iceberg-go/pull/2646#discussion_r4657806330


##########
table/update_schema.go:
##########
@@ -1129,15 +1131,28 @@ func (u *UpdateSchema) BuildUpdates() ([]Update, 
[]Requirement, error) {
                        )
                }
 
-               if u.nameMapping != nil {
+               // Keep the table's name mapping in step with the schema, as 
Java's
+               // SchemaUpdate and PyIceberg's UpdateSchema do. Otherwise 
files without
+               // field IDs cannot be resolved for added or renamed columns.
+               nameMapping := u.nameMapping
+               if nameMapping == nil {
+                       nameMapping = meta.NameMapping()

Review Comment:
   Added a comment in 5c37192 saying the skip is deliberate. I also updated the 
Testing section of the description to point to `update_schema_test.go`.



-- 
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]

Reply via email to