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

Implement the Arrow C stream interface for DataFrame #14208

Open
eitsupi opened this issue Feb 2, 2024 · 4 comments
Open

Implement the Arrow C stream interface for DataFrame #14208

eitsupi opened this issue Feb 2, 2024 · 4 comments
Labels
A-interop Area: interoperability with other libraries enhancement New feature or an improvement of an existing feature

Comments

@eitsupi
Copy link
Contributor

eitsupi commented Feb 2, 2024

Description

r-polars has the ability to export DataFrames via the Arrow C stream interface (pola-rs/r-polars#5, by @paleolimbot).
https://arrow.apache.org/docs/format/CStreamInterface.html

Since this is not related to R, I believe that porting it through the polars crate will make it easier for all downstream projects to exchange DataFrames with other Arrow implementations.
Conversely, it would be useful to be able to create DataFrames via the Arrow C stream interface.

For example, arrow-rs seems to exchange stream data with pyarrow (i.e., C++ libarrow) as follows:
https://github.com/apache/arrow-rs/blob/121666e464170d7dce41bfd61de001a19affde72/arrow/src/pyarrow.rs#L387-L448

@eitsupi eitsupi added the enhancement New feature or an improvement of an existing feature label Feb 2, 2024
@eitsupi eitsupi changed the title Impriment the Arrow C stream interface for DataFrame Implement the Arrow C stream interface for DataFrame Feb 2, 2024
@stinodego stinodego added the A-interop Area: interoperability with other libraries label Feb 3, 2024
@ritchie46
Copy link
Member

Yes, can you port that work to the polars-arrow? It can iterator over a Vec<arrow::Chunk> in that case.

@eitsupi
Copy link
Contributor Author

eitsupi commented Feb 4, 2024

Yes, can you port that work to the polars-arrow? It can iterator over a Vec<arrow::Chunk> in that case.

Sorry, but I may not have enough knowledge and time.
I think polars-arrow does not have DataFrame, but if we define an iterator in polars-arrow, does that mean we can also realize iterator for DataFrame?

@etiennebacher
Copy link

etiennebacher commented Jul 18, 2024

I think this is fixed by #17696?

@eitsupi
Copy link
Contributor Author

eitsupi commented Jul 18, 2024

I think this is fixed by #17696?

No, that is not C Stream interface, C interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interop Area: interoperability with other libraries enhancement New feature or an improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants