Closed sspaeti closed 1 year ago
why depends on duckdb 0.1 version but libduckdb-sys 0.5.1 ? suggest to always use the same version, and latest version which is 0.5.1.
0.1 version duckdb doesn't support arrow
Thank you so much for your kind answer. OK now I see, I updated to the latest 0.5.1
, but still has the same error.
Which Cargo.toml
should be used for the simple example on the left? Should that work with the right dependencies, or should I follow something like this https://github.com/wangfenjin/duckdb-rs/blob/main/Cargo.toml?
Refer to #88 , the readme example should works fine. You can try run the example in command line with cargo. Not sure what's the problem with your code editor
Didn't really manage to make it work, but I used some part of this https://github.com/hotg-ai/weld-studio/blob/7121cbffbbe7dd4ee703b1dd8b3be89daee1f857/src-tauri/src/sql.rs and removed let rbs: Vec<RecordBatch> = stmt.query_arrow([])?.collect();
.
Now I have managed to have a working starting point. Thanks so much; I will close.
Hi @sspaeti
I checked the issue again. The arrow version in your project's Cargo.toml should be same as the version in duckdb (latest one is version 23) . Otherwise it may report error.
Sorry for the inconvenience.
I ran into this problem a lot as well and the rustc error message isn't very helpful in this case and doesn't actually tell you what the problem is, i.e. it has nothing to do with an iterator and is actually just a version mismatch between different versions of arrow
.
This would be helped a lot by #92 .
Excellent, thanks so much, you both. The example of Readme with the arrow version 23
worked!
For anyone else, this is my Cargo.toml
:
[package]
name = "duckdb-playground"
version = "0.1.0"
edition = "2021"
[dependencies.duckdb]
version = "0.5.1"
features = ["bundled"]
[dependencies]
libduckdb-sys = "0.5.1"
arrow = { version = "23", features = ["prettyprint", "ffi"] }
I'm a total starter and trying to learn Rust with DuckDB. Just close if it's too basic of a question, just posting it here in case others have trouble getting started.
Error:
Question: What am I doing wrong:
I understand the rust
iterator
does not like the arrowRecordBatch
. But how can I fix that, did I use the wrong arrow dependencies in myCargo.toml
on the right?