xanderbailey opened a new pull request, #3413:
URL: https://github.com/apache/iceberg-rust/pull/3413

   `reuse_partition_field_ids` collects (source_id, transform) -> field_id into 
a HashMap with no merge function, so when several specs give one pair different 
field ids the last one visited wins. `partition_specs` is itself a HashMap, so 
the winner changes from run to run and the same input metadata yields different 
output.
   
   Keep the highest id of each pair, as Iceberg Java does:
   
       Collectors.toMap(
           field -> Pair.of(field.sourceId(), field.transform().toString()),
           PartitionField::fieldId,
           Math::max)
   
   Divergent ids for one pair cannot be produced by this crate, since the reuse 
rule keeps them converged, but they can be read from tables written before the 
rule existed or by writers that do not apply it.
   
   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   - Closes #.
   
   ## What changes are included in this PR?
   
   <!--
   Provide a summary of the modifications in this PR. List the main changes 
such as new features, bug fixes, refactoring, or any other updates.
   -->
   
   ## Are these changes tested?
   
   <!--
   Specify what test covers (unit test, integration test, etc.).
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   ## AI Disclosure
   
   <!--
   
https://iceberg.apache.org/contribute/#guidelines-for-ai-assisted-contributions
   -->
   


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