Comments (10)
Sorry to tell you that it also works fine on my side...
Maybe you can try move the "INSTALL and LOAD" stmt right after let conn = Connection::open_in_memory()?; . But anyway it shouldn't matter.
BTW, you can use the parquet feature of this crate, we had bundle the feature so you don't need to install at runtime.
from duckdb-rs.
For anyone have this issue, I may suggest you use the parquet
feature of this crate so you don't need to install the extension at runtime
from duckdb-rs.
I just tested this on 0.7.1
and it works.
from duckdb-rs.
Don't know why two user report the same issue twice... Maybe there is some hidden issue but it always works fine on my side.
Anyway the bundled feature just copy all the source code and building it using your local compiler, same as what duckdb itself does, shouldn't have any inconsistent.
from duckdb-rs.
Let's keep this issue open in case some others also face the same issue
from duckdb-rs.
Thanks for the quick reply. I'll do a fresh test and try the bundled parquet feature.
Maybe you can try move the "INSTALL and LOAD" stmt right after let conn = Connection::open_in_memory()?; . But anyway it shouldn't matter.
FWIW I got the same issue trying to run the parquet example. Which does that.
from duckdb-rs.
Using parquet
feature seems to resolve the issue:
duckdb-test on master [?] is 📦 v0.1.0 via 🦀 v1.69.0
❯ cargo clean && cargo run --bin duckdb-test
...
Finished dev [unoptimized + debuginfo] target(s) in 54.39s
Running `target/debug/duckdb-test`
Found person Person { id: 1, name: "Steven", data: None }
+----+--------+------+
| id | name | data |
+----+--------+------+
| 1 | Steven | |
+----+--------+------+
+----------+----------------------+-----------------------+-----------------+---------------+------------+--------------------+--------------+--------------+--------------+-------------+-------+---------+------------+--------------+-----------------------+--------------+----------------------+-------------+
| VendorID | tpep_pickup_datetime | tpep_dropoff_datetime | passenger_count | trip_distance | RatecodeID | store_and_fwd_flag | PULocationID | DOLocationID | payment_type | fare_amount | extra | mta_tax | tip_amount | tolls_amount | improvement_surcharge | total_amount | congestion_surcharge | airport_fee |
+----------+----------------------+-----------------------+-----------------+---------------+------------+--------------------+--------------+--------------+--------------+-------------+-------+---------+------------+--------------+-----------------------+--------------+----------------------+-------------+
| 1 | 2022-01-01T00:35:40 | 2022-01-01T00:53:29 | 2.0 | 3.8 | 1.0 | N | 142 | 236 | 1 | 14.5 | 3.0 | 0.5 | 3.65 | 0.0 | 0.3 | 21.95 | 2.5 | 0.0 |
| 1 | 2022-01-01T00:33:43 | 2022-01-01T00:42:07 | 1.0 | 2.1 | 1.0 | N | 236 | 42 | 1 | 8.0 | 0.5 | 0.5 | 4.0 | 0.0 | 0.3 | 13.3 | 0.0 | 0.0 |
| 2 | 2022-01-01T00:53:21 | 2022-01-01T01:02:19 | 1.0 | 0.97 | 1.0 | N | 166 | 166 | 1 | 7.5 | 0.5 | 0.5 | 1.76 | 0.0 | 0.3 | 10.56 | 0.0 | 0.0 |
| 2 | 2022-01-01T00:25:21 | 2022-01-01T00:35:23 | 1.0 | 1.09 | 1.0 | N | 114 | 68 | 2 | 8.0 | 0.5 | 0.5 | 0.0 | 0.0 | 0.3 | 11.8 | 2.5 | 0.0 |
| 2 | 2022-01-01T00:36:48 | 2022-01-01T01:14:20 | 1.0 | 4.3 | 1.0 | N | 68 | 163 | 1 | 23.5 | 0.5 | 0.5 | 3.0 | 0.0 | 0.3 | 30.3 | 2.5 | 0.0 |
| 1 | 2022-01-01T00:40:15 | 2022-01-01T01:09:48 | 1.0 | 10.3 | 1.0 | N | 138 | 161 | 1 | 33.0 | 3.0 | 0.5 | 13.0 | 6.55 | 0.3 | 56.35 | 2.5 | 0.0 |
| 2 | 2022-01-01T00:20:50 | 2022-01-01T00:34:58 | 1.0 | 5.07 | 1.0 | N | 233 | 87 | 1 | 17.0 | 0.5 | 0.5 | 5.2 | 0.0 | 0.3 | 26.0 | 2.5 | 0.0 |
| 2 | 2022-01-01T00:13:04 | 2022-01-01T00:22:45 | 1.0 | 2.02 | 1.0 | N | 238 | 152 | 2 | 9.0 | 0.5 | 0.5 | 0.0 | 0.0 | 0.3 | 12.8 | 2.5 | 0.0 |
| 2 | 2022-01-01T00:30:02 | 2022-01-01T00:44:49 | 1.0 | 2.71 | 1.0 | N | 166 | 236 | 1 | 12.0 | 0.5 | 0.5 | 2.25 | 0.0 | 0.3 | 18.05 | 2.5 | 0.0 |
| 2 | 2022-01-01T00:48:52 | 2022-01-01T00:53:28 | 1.0 | 0.78 | 1.0 | N | 236 | 141 | 2 | 5.0 | 0.5 | 0.5 | 0.0 | 0.0 | 0.3 | 8.8 | 2.5 | 0.0 |
+----------+----------------------+-----------------------+-----------------+---------------+------------+--------------------+--------------+--------------+--------------+-------------+-------+---------+------------+--------------+-----------------------+--------------+----------------------+-------------+
Appreciate the help.
from duckdb-rs.
#163 I'll run all examples in CI to make sure it pass. It works fine on my machine.
from duckdb-rs.
I am facing the same issue on Mac M1 13.4. Sample parquet example works fine with 0.7.1.
from duckdb-rs.
For anyone have this issue, I may suggest you use the
parquet
feature of this crate so you don't need to install the extension at runtime
This fixed it for me (Mac arm64), build without parquet
feature:
$ cargo r --example parquet --features=bundled
Compiling duckdb v0.8.1
Finished dev [unoptimized + debuginfo] target(s) in 4.80s
Running `target/debug/examples/parquet`
Assertion failed: (dynamic_cast<TARGET *>(this)), function Cast, file parse_info.hpp, line 22.
[1] 75821 abort cargo r --example parquet --features=bundled
build with parquet
feature:
cargo r --example parquet --features=bundled,parquet
Compiling duckdb v0.8.1
Finished dev [unoptimized + debuginfo] target(s) in 5.64s
Running `target/debug/examples/parquet`
+-------+
| value |
+-------+
| 1.00 |
| 2.00 |
| 3.00 |
| 4.00 |
....
| 24.00 |
+-------+
from duckdb-rs.
Related Issues (20)
- Cross compilation error HOT 4
- Failed to parse format specifier %u: Unrecognized format for strftime/strptime: %u
- Issue with Mutable Borrow of Statement when Accessing Column Names (Option::unwrap()) HOT 3
- Motherduck compatibility HOT 3
- [Question] how to convert UBIGINT[] to Vec<u64> HOT 2
- u64 not being casted to UBigInt and being casted to BigInt instead HOT 1
- Feature request - support Timestamp data types in the appender api
- column_count can panic
- Assertion failed: types == input.GetTypes() in column_data_collection.cpp, line 718
- impl Drop for Appender has unnecessary unsafe calls.
- Listing tables in rust never iterates HOT 2
- duckdb-rs 0.10.0 compilation failed on windows 11
- duckdb-rs 0.10 is failing on macOS Venture (13.5.2) with code 14 HOT 2
- `DataStruct.struct_vector(i).child(j)` leads to assertion failure
- No support for `UHUGEINT` (`u128`) in `FromSql` trait HOT 2
- Proper way of creating a static connection pool with r2d2 HOT 2
- The latest rust crate build for MacOS fails with default settings HOT 1
- Compared to sqlite, query execution speed is several times slower in rust code HOT 13
- BUG: Panic on `SELECT * FROM arrow(?, ?)` when using `TimestampMillisecondArray` arrow type. HOT 5
- Segfault when using `appender` with Generated Columns
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duckdb-rs.