feat: add custom_metadata support to RecordBatch with IPC read/write#9445
Open
rustyconover wants to merge 1 commit intoapache:mainfrom
Open
feat: add custom_metadata support to RecordBatch with IPC read/write#9445rustyconover wants to merge 1 commit intoapache:mainfrom
custom_metadata support to RecordBatch with IPC read/write#9445rustyconover wants to merge 1 commit intoapache:mainfrom
Conversation
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 Written with AI assistance; all changes reviewed by the author.
Author
|
This actually doesn't have anything to do with arrow-flight |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
custom_metadataonRecordBatch(IPC Message field) #9444.What changes are included in this PR?
Add per-batch
custom_metadatatoRecordBatch, matching thecustom_metadatafield on the IPCMessageflatbuffer envelope. This allows attaching per-batch metadata separate from schema-level metadata, bringing parity with PyArrow'swrite_batch(custom_metadata=...)API (available since PyArrow v11.0.0).Changes:
custom_metadata: HashMap<String, String>field toRecordBatchwithcustom_metadata(),custom_metadata_mut(),with_custom_metadata(), andinto_parts_with_custom_metadata()accessorsflight_data_to_arrow_batchfilter_record_batchandtake_record_batchslice(),project(),normalize(),with_schema(), andremove_column()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.