Fixed compilation errors - #1
Conversation
There was a problem hiding this comment.
Thanks for your contribution!
This repository was left alone because it seems to have no real users.
What is your use case?
polars:::export_df_to_arrow_streamhas been removed, thus still unusable. Unable to find equivalent for quick fix.
Currently the polars package can exchange Arrow Streams via a string representing a pointer to the Arrow Stream, but it is actually possible to directly reference an external pointer to bring it into the Rust side. I think we need to rewrite the export_stream() and import_stream() methods to do so.
I don't have time this week and will be able to work on that next week, but if you are interested, please refer to the following sections to work on it.
https://github.com/yutannihilation/datafusion-r/blob/d908c42c4703d581bbcc0e5522d0ad6f98f2c783/src/rust/src/lib.rs#L42-L49
| polars = { version = "*", default_features = false, features = ["dtype-struct"]} | ||
| polars-core = { version = "*", default_features = false } |
There was a problem hiding this comment.
cargo warned me that this parameter is not available for polars & polars_core. To be honest: I am unsure about the implications of these changes and just wanted to remove compiler warnings along the way.
There was a problem hiding this comment.
I don't think this change is ideal here because the default functionality includes extra stuff.
Interesting. This looks like a much cleaner and performant solution. Let me know if I can assist you in any way. There is no need to hurry to implement it from my side, but it would open up some interesting opportunities for some projects that require extensive number crunching. I try to make room to have a look at the datafusion-r implementation. |
I have tried this a bit and it seems impossible because there is no API in extendr to cast an external pointer to something else. |
Honestly, I doubt that using Polars from outside of Python (i.e. Rust, R, etc.) is worth the maintenance cost, and I would recommend considering alternatives such as DuckDB or DataFusion. |
Absolutely fair. It would actually be interesting if you found a way to actually extract the forementioned pointer string, just out of curiosity. But do not put effort into that. |
|
I opened pola-rs/r-polars#1138. I have looked at this for a few hours and have not been able to resolve it. Feel free to edit that. |
Fixed some compilation error. Build works, but
polars:::export_df_to_arrow_streamhas been removed, thus still unusable. Unable to find equivalent for quick fix.