Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFI for Arrow C Stream Interface #1348

Closed
wjones127 opened this issue Feb 20, 2022 · 0 comments · Fixed by #1384
Closed

FFI for Arrow C Stream Interface #1348

wjones127 opened this issue Feb 20, 2022 · 0 comments · Fixed by #1384
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog help wanted

Comments

@wjones127
Copy link
Member

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Enable receiving/sending a stream of Record Batches from/to another Arrow implementation. For example, datafusion-contrib/datafusion-python#21 could benefit from a way to import a RecordBatchReader into Rust so it can be used by DataFusion.

Describe the solution you'd like

It might be worth implementing the Arrow C Stream interface, which allows exporting a stream of record batches. This could enable PyArrow conversion between a PyArrow RecordBatchReader and some structure on the Rust side (an iterator of Record Batches?).

Describe alternatives you've considered

We can use FFI to bring over record batches already. In datafusion-contrib/datafusion-python#21 , I experimented with just wrapping a Python iterator and moving each batch individually, but encountered some issues with deadlocks in the Python GIL.

Additional context

The Arrow C Stream interface was introduced in August 2020, in apache/arrow#8052. It's been used so far to enable sending record batch streams to DuckDB from the R and Python implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants