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

   ## Which issue does this PR close?
   
   - Closes #.
   
   ## What changes are included in this PR?
   
   Equality delete files written by iceberg-rust are missing the `delete-type` 
and `delete-field-ids` key-value metadata in the Parquet file footer. Java 
writes these in 
[`Parquet.java#L1017-L1022`](https://github.com/apache/iceberg/blob/main/parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java#L1041-L1046)
   ORC also does this but we don't support ORC in rust.
   
   This PR adds a `with_footer_metadata(key, value)` method to the 
`FileWriterBuilder` trait and wires it up so 
`EqualityDeleteFileWriterBuilder::new()` automatically injects the metadata. 
The metadata is now written without callers having to remember to set it.
   
   The trait-level approach was chosen over a Parquet-specific helper because 
Java writes the same metadata across all three file formats. A future ORC or 
Avro writer can implement `with_footer_metadata` and the delete writers will 
work without changes.
   
   Trade-off: adding a required method to `FileWriterBuilder` is a breaking 
change for any out-of-tree implementations of the trait. `ParquetWriterBuilder` 
is the only implementation today so this shouldn't affect anyone in practice.
   
   Position delete writers don't exist yet in iceberg-rust, but when they do, 
the same `with_footer_metadata` plumbing can be used to add `delete-type: 
position`.
   
   ## Are these changes tested?
   Yes
   


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