jx2lee opened a new pull request, #2333:
URL: https://github.com/apache/iceberg-go/pull/2333

   ## Description
   
   Fixes #<issue>
   
   `updateColumn` built the renamed field's full name with 
`append(path[:len(path)-1], newName)`. The prefix shares its backing array with
   `path`, so the append overwrote the caller's last path element. Because
   `UpdateSchema` re-runs its ops on every `Apply`/`BuildUpdates`, a later op on
   the same slice, or a second `Apply`, looked up the new name in the old schema
   and failed with `field not found`.
   
   Clone the prefix before appending.
   
   ## Testing
   
   - `TestRenameColumnDoesNotMutatePath`: rename then update doc through the 
same
     slice, and the slice is unchanged afterwards.
   - `TestRenameColumnApplyThenBuildUpdates`: `Apply()` then `BuildUpdates()` 
on a
     nested rename.
   - Both fail on main with `field not found: address.town` and pass with the 
fix.
   ```
   
   


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