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

feat: Implement Arrow PyCapsule Interface for data import, schema #9660

Closed
1 task done
kylebarron opened this issue Jul 22, 2024 · 3 comments · Fixed by #9663
Closed
1 task done

feat: Implement Arrow PyCapsule Interface for data import, schema #9660

kylebarron opened this issue Jul 22, 2024 · 3 comments · Fixed by #9663
Assignees
Labels
feature Features or general enhancements
Milestone

Comments

@kylebarron
Copy link

Is your feature request related to a problem?

This is a follow up to a previous feature request (#9140). That added export via the PyCapsule interface but I think there's also further gains from being able to import via the PyCapsule interface as well.

Additionally, the ibis schema is presumably Arrow or arrow-compatible under the hood? It would be great to implement the PyCapsule Interface on the schema object as well.

What is the motivation behind your request?

Easier interoperability between Ibis and other Python Arrow-based libraries.

Describe the solution you'd like

I'm not sure how ibis works under the hood and whether there's an easy API for Arrow import that's already in Python? I see there's a read_parquet method but is that pushed down to relevant implementations?

What version of ibis are you running?

Latest

What backend(s) are you using, if any?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kylebarron kylebarron added the feature Features or general enhancements label Jul 22, 2024
@jcrist
Copy link
Member

jcrist commented Jul 22, 2024

Additionally, the ibis schema is presumably Arrow or arrow-compatible under the hood? It would be great to implement the PyCapsule Interface on the schema object as well.

This is definitely doable, can push up a PR momentarily.

I think there's also further gains from being able to import via the PyCapsule interface as well.

I'm not sure what you're exactly asking for here. Are you asking for a way to create an ibis.Table from something exposing an __arrow_c_stream__ interface (fairly easy)? Or from the capsule object itself? Or something else?

@kylebarron
Copy link
Author

I'm not sure what you're exactly asking for here. Are you asking for a way to create an ibis.Table from something exposing an __arrow_c_stream__ interface (fairly easy)?

Yes, that's all!

@jcrist jcrist self-assigned this Jul 22, 2024
@jcrist
Copy link
Member

jcrist commented Jul 22, 2024

Got it, thanks! I'll push up a PR adding both ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Features or general enhancements
Projects
Status: done
Development

Successfully merging a pull request may close this issue.

2 participants