Commits


Yue Ni authored and Antoine Pitrou committed 942f77e5c52
ARROW-16131 [C++] support saving and retrieving custom metadata in batches for IPC file This PR aims to address https://issues.apache.org/jira/projects/ARROW/issues/ARROW-16131 Currently, when writing an IPC file with multiple record batches using the `arrow::ipc::RecordBatchWriter`, the `custom_metadata` for each record batch is not saved and will be discarded silently. The current writer does provide the `AppendCustomMetadata` API internally, but it is never called. I use this API to add the custom metadata during writing and retrieve the custom metadata when reading the record batch. I am not completely sure if this is intentionally ignored or accidentally missing, but from a user's perspective, the metadata can be set via public API (see the example case in ARROW-16131) and I think it is not very friendly that this piece of data is silently discarded. Several test cases are added in the `read_write_test.cc` for verifying this change. Closes #12812 from niyue/bugfix/ipc-batch-meta Lead-authored-by: Yue Ni <niyue.com@gmail.com> Co-authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>