xanderbailey opened a new issue, #3281:
URL: https://github.com/apache/iceberg-rust/issues/3281

   We now have three near-identical walkers that rebuild a schema's field tree 
while reassigning ids:
   
   - 
[`ReassignFieldIds`](https://github.com/apache/iceberg-rust/blob/9a2111a914e9b17fdc039700186056ec14fae606/crates/iceberg/src/spec/schema/id_reassigner.rs#L29-L145)
   - [`assign_fresh_ids` / `assign_fresh_ids_to_type` in 
`update_schema.rs`](https://github.com/apache/iceberg-rust/blob/9a2111a914e9b17fdc039700186056ec14fae606/crates/iceberg/src/transaction/update_schema.rs#L163-L209)
   - `spec/schema/assign_fresh_ids.rs`, added in #3066
   
   The [`apply_to_identifier_fields` and `apply_to_aliases` 
helpers](https://github.com/apache/iceberg-rust/blob/9a2111a914e9b17fdc039700186056ec14fae606/crates/iceberg/src/spec/schema/id_reassigner.rs#L118-L144)
 are identical between the first and third. A fix to overflow handling, error 
wording, or traversal order has to land in three places.
   
   Suggestion: parameterise `ReassignFieldIds` with a strategy for picking the 
new id for an old id (default fresh, overridable to check a base schema by name 
first), and share the `apply_to_*` helpers.
   
   Worth preserving: the map arms differ on purpose. `ReassignFieldIds` 
recurses the key subtree before assigning the value id, while 
`assign_fresh_ids` resolves both ids first to match Java. Tests pin both orders.
   
   Raised in review of #3066.
   


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