You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the Appender api but get a segfault when there is a timestamp in the row. Here's a minimal example showing what happens (and here is a repo reproducing it):
#[test]fntimestamp_appender_minimal_example_sig_segv(){let db = Connection::open_in_memory().unwrap();let create_table_sql = r" CREATE TABLE item ( id INTEGER NOT NULL, ts TIMESTAMP );";
db.execute_batch(create_table_sql).unwrap();letmut app = db.appender("item").unwrap();let row_count = 10;for i in0..row_count {
app.append_row(params![i, "1970-01-01T00:00:00Z"]).unwrap();}// running 1 test// error: test failed, to rerun pass '--lib'// Caused by:// process didn't exit successfully: `/path-to-repo` (signal: 11, SIGSEGV: invalid memory reference)let val = db
.query_row("SELECT count(1) FROM item",[], |row| {
<(u32,)>::try_from(row)}).unwrap();assert_eq!(val, (row_count,));}
I've enabled the chrono feature and tried with Utc::now as well. This is using the bundled version of duckdb.
I'd love to help fix the issue, would you mind pointing me in the right direction? I started a draft with failing tests here
The text was updated successfully, but these errors were encountered:
Hi @danbruder , thanks for the report! The root cause is currently we don't support bind timestamp param. It will not be an easy fix, but I'll give you some clue:
The most important change we need is to add support binding timestamp in here
// this is simplified, we need to convert i according to timeunit uValueRef::Timestamp(u, i) => unsafe{ ffi::duckdb_append_timestamp(ptr, ffi::duckdb_timestamp{micros: i})}
Then we need support convert some rust data types into Value type
Thanks for the crate!
I'm trying to use the
Appender
api but get a segfault when there is a timestamp in the row. Here's a minimal example showing what happens (and here is a repo reproducing it):I've enabled the chrono feature and tried with
Utc::now
as well. This is using thebundled
version of duckdb.I'd love to help fix the issue, would you mind pointing me in the right direction? I started a draft with failing tests here
The text was updated successfully, but these errors were encountered: