ShivanshhhG commented on PR #19288:
URL: https://github.com/apache/iceberg/pull/19288#issuecomment-7386211053

   Good catch @shihchengwei-lab — thank you for the detailed reproduction!
   
   Updated `SchemaUpdate` (commit `79ea18d42`) to track existing and staged 
identifier fields by field ID rather than rewriting string paths during 
`renameColumn()`, while retaining name resolution in `applyChanges()` for newly 
added columns (and resolving pending names if `caseSensitive(false)` is called 
afterwards). Also removed the stale path rewriting logic so delete validation 
checks field IDs directly.
   
   Added regression tests in `TestSchemaUpdate` covering:
   - `Table.updateSchema()` across format versions 1, 2, and 3 with staged 
parent + leaf renames and sibling name collisions (`s` -> `r`, `s.id` -> 
`old_id`, `s.group_id` -> `id`)
   - Sibling column name swapping in the same `SchemaUpdate`
   - Calling `setIdentifierFields()` after staged renames
   - `caseSensitive(false)` after `setIdentifierFields()` + rename, and 
delete-after-rename rejection
   
   Verified with `:iceberg-core:spotlessApply`, `:iceberg-core:checkstyleMain`, 
`:iceberg-core:checkstyleTest`, and `:iceberg-core:test --tests 
org.apache.iceberg.TestSchemaUpdate` (102/102 passing).


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