huan233usc commented on code in PR #17034:
URL: https://github.com/apache/iceberg/pull/17034#discussion_r3510154878


##########
core/src/main/java/org/apache/iceberg/SchemaUpdate.java:
##########
@@ -167,6 +167,19 @@ private void internalAddColumn(
 
     // update tracking for moves
     addedNameToId.put(caseSensitivityAwareName(fullName), newId);
+    if (parent != null) {
+      // fullName uses the parent's canonical name, which for a map value or 
list element
+      // struct includes the synthetic "value"/"element" segment (e.g. 
locations.value.alt).
+      // Also index the user-facing short name (locations.alt) so later 
operations in this
+      // transaction that reference the column by that name resolve it.
+      // Add the short name only if it is not already mapped, so a name 
containing dots
+      // cannot shadow another added column that already owns that name (as 
its canonical
+      // full name or its own short name).

Review Comment:
   Thanks, simplified a bit



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