rustyconover opened a new pull request, #9445:
URL: https://github.com/apache/arrow-rs/pull/9445

   # Which issue does this PR close?
   
   - Closes #9444.
   
   # What changes are included in this PR?
   
   Add per-batch `custom_metadata` to `RecordBatch`, matching the 
`custom_metadata` field on the IPC `Message` flatbuffer envelope. This allows 
attaching per-batch metadata separate from schema-level metadata, bringing 
parity with PyArrow's `write_batch(custom_metadata=...)` API (available since 
PyArrow v11.0.0).
   
   Changes:
   - Add `custom_metadata: HashMap<String, String>` field to `RecordBatch` with 
`custom_metadata()`, `custom_metadata_mut()`, `with_custom_metadata()`, and 
`into_parts_with_custom_metadata()` accessors
   - IPC writer: serialize custom_metadata to Message flatbuffer
   - IPC reader: extract custom_metadata from Message at FileDecoder, 
StreamReader, and StreamDecoder call sites
   - arrow-flight: extract and propagate custom_metadata in 
`flight_data_to_arrow_batch`
   - arrow-select: preserve custom_metadata through `filter_record_batch` and 
`take_record_batch`
   - Metadata preserved through `slice()`, `project()`, `normalize()`, 
`with_schema()`, and `remove_column()`
   - PyArrow-generated test data for cross-language interop validation
   
   # Are these changes tested?
   
   Yes there are tests in the PR.
   
   # Are there any user-facing changes?
   
   There are no breaking changes.
   
   Written with AI assistance; all changes reviewed by the author.
   


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

Reply via email to