-
Notifications
You must be signed in to change notification settings - Fork 820
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
Python FFI bridge for Schema, Field and DataType #439
Conversation
@jorgecarleitao what is the rational behind wrapping |
Codecov Report
@@ Coverage Diff @@
## master #439 +/- ##
==========================================
- Coverage 82.76% 82.71% -0.06%
==========================================
Files 165 166 +1
Lines 45724 45853 +129
==========================================
+ Hits 37844 37927 +83
- Misses 7880 7926 +46
Continue to review full report at Codecov.
|
At the time I had limited knowledge of what I was doing. I think that we could refactor this so that the arrays are shared and the datatypes are copied, since we do not really need to share metadata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thanks a lot, @kszucs !
Thanks for the review, I'm going to add more tests. |
While the conversions do copy between the C schema and rust DataType/Field/Schema structs cc @pitrou to confirm that the lifetimes are properly handled. This PR shouldn't affect how the arrays get exchanged. |
@jorgecarleitao what do you think about implementing |
The clippy errors should be unrelated. |
@ritchie46 you might be interested in this, as I saw https://github.com/pola-rs/polars/tree/master/py-polars/src/arrow_interop |
I think that it is a good idea. I am not sure how to execute on it though, as I never built a Rust library out of pyo3. E.g. DataFusion requires some conversions that are currently called from Rust (not Python). Is it enough for it to depend on "arrow-rs-python"? So, I would say let's try it and see how this goes in terms of packaging and dependency management. |
@jorgecarleitao created the relevant follow-up tickets and cleaned up the PR. |
@jorgecarleitao @alamb resolved conflicts with 8672274 |
@jorgecarleitao may I go ahead and merge it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this slipped under my radar :(
I went through this carefully and it is an amazing improvement imo. Really neat stuff,
@kszucs . Thank you very much for this.
I do not have comments; it is ready imo
@kszucs I took the liberty of rebasing this PR and fixing clippy -- it should be good to go now once the CI passes |
Thanks everyone! Merging it then. |
TODOs:
Which issue does this PR close?
Closes #.
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?