Giter Club home page Giter Club logo

Comments (10)

wangfenjin avatar wangfenjin commented on June 5, 2024 1

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.

wangfenjin avatar wangfenjin commented on June 5, 2024 1

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.

wssheldon avatar wssheldon commented on June 5, 2024

I just tested this on 0.7.1 and it works.

from duckdb-rs.

wangfenjin avatar wangfenjin commented on June 5, 2024

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.

wangfenjin avatar wangfenjin commented on June 5, 2024

Let's keep this issue open in case some others also face the same issue

from duckdb-rs.

wssheldon avatar wssheldon commented on June 5, 2024

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.

wssheldon avatar wssheldon commented on June 5, 2024

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.

wangfenjin avatar wangfenjin commented on June 5, 2024

#163 I'll run all examples in CI to make sure it pass. It works fine on my machine.

from duckdb-rs.

ssiva avatar ssiva commented on June 5, 2024

I am facing the same issue on Mac M1 13.4. Sample parquet example works fine with 0.7.1.

from duckdb-rs.

vincev avatar vincev commented on June 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.