arrow
arrow copied to clipboard
GH-43631: [C++] Add C++ implementation of Async C Data Interface
Rationale for this change
Building on #43632 which created the Async C Data Structures, this adds functions to bridge.h/bridge.cc to implement helpers for managing the Async C Data interfaces
What changes are included in this PR?
Two functions added to bridge.h:
CreateAsyncDeviceStreamHandlerpopulates aArrowAsyncDeviceStreamHandlerand anExecutorto provide a future that resolves to anAsyncRecordBatchGeneratorto produce record batches as they are pushed asynchronously. TheArrowAsyncDeviceStreamHandlercan then be passed to any asynchronous producer.ExportAsyncRecordBatchReadertakes a record batch generator and a schema, along with anArrowAsyncDeviceStreamHandlerto use for calling the callbacks to push data as it is available from the generator.
Are these changes tested?
Unit tests are added (currently only one test, more tests to be added)
Are there any user-facing changes?
No
- GitHub Issue: #43631