apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
6.02k stars 1.14k forks source link

Any plan to implement datafusion go/c++ binding? #2485

Open xiaofan-luan opened 2 years ago

xiaofan-luan commented 2 years ago

Is your feature request related to a problem or challenge? Please describe what you are trying to do. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and why for this feature, in addition to the what)

Hi All, I'm from Milvus community(https://github.com/search?q=milvus) and we are a vector database written in Go/C++, I really love what datafusion is doing! We store our scalar data in arrow, currently we copy arrow into vector or other format for executing predication. Datafusion fits our need to filter out data from arrow, just curious if we have any plan to support datafusion in cpp~ Thanks!

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

houqp commented 2 years ago

Hi @xiaofan-luan , I have been following milvus for a long time and would love to see a synergy between the two communities :D

It shouldn't be too hard to expose our high level interfaces through C ABI for C++ and Go. For example: http://bitboom.github.io/calling-rust-from-cpp. We might need to add a couple of small high level public APIs to help pass record batches between C++ and Rust through the Arrow C Data interface.

I don't know if anyone is actively working on the C binding for datafusion right now, but if there is enough interests, we could create a new repo at https://github.com/datafusion-contrib to facilitate the collaboration.

jimexist commented 2 years ago

I don't know if anyone is actively working on the C binding for datafusion right now, but if there is enough interests, we could create a new repo at https://github.com/datafusion-contrib to facilitate the collaboration.

indeed, that C API could also benefit Java binding as well, because it'll be much better than the current JNI approach (and also in future when Java panama project is landed)

xiaofan-luan commented 2 years ago

@houqp great! let me know if we decide to do so, we can help on evaluating the initial version and might help on contributing it!

houqp commented 2 years ago

Now we just need to wait for someone from the community to lead this effort :D

gedw99 commented 1 year ago

He will do it !!

codeboyyong commented 5 months ago

hello, any update on this topic? I am also interesting in how to call data fusion in go app.

derekperkins commented 3 months ago

Also interested in a Go integration

adarshsrivastava11 commented 2 months ago

Since there is already https://github.com/datafusion-contrib/datafusion-c/tree/main, can we not directly use it in our go code? Do you have any tips or caveats to watch out for? @houqp

erezrokah commented 2 months ago

Now we just need to wait for someone from the community to lead this effort :D

Let's say someone is interested in looking into implementing the Go bindings, what would be the best place to start?

jayzhan211 commented 2 months ago

I guess the question is actually how to use rust code in golang, and I think there is no a de facto solution yet. I found a post that maybe helpful.