badalprasadsingh commented on code in PR #1359:
URL: https://github.com/apache/iceberg-go/pull/1359#discussion_r3637170333


##########
table/update_schema.go:
##########
@@ -631,6 +632,368 @@ func (u *UpdateSchema) SetIdentifierField(paths 
[][]string) *UpdateSchema {
        return u
 }
 
+// UnionByNameWith stages changes to evolve the current schema into the union 
of
+// itself and newSchema, matching fields by name (honoring caseSensitive):
+//
+//   - New fields are added as optional (regardless of their incoming required
+//     flag), keeping their Doc/InitialDefault/WriteDefault and getting fresh 
ids.
+//   - Existing fields may be evolved: required->optional is applied,
+//     optional->required is skipped. A primitive type change is applied only 
if
+//     it is a valid promotion (int->long, float->double, decimal same-scale
+//     wider-precision, or exact match); narrowing is ignored and any other
+//     change errors.
+//   - A Doc is updated only when the incoming Doc is non-empty and differs (an
+//     empty Doc never clears an existing one).
+//   - A WriteDefault is updated when the incoming value differs; an existing
+//     column's InitialDefault is never modified.
+//   - Map keys are immutable and cross-kind changes (list->map, struct->list,
+//     etc.) are rejected rather than silently grafted onto the existing 
column.
+//
+// The change is queued and applied with other pending updates on Apply/Commit,
+// so fields added by an earlier op in the same UpdateSchema are visible here.

Review Comment:
   Yes you are right. 
   
   Done. Corrected the Doc.



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