Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when using appender with Generated Columns #287

Closed
samuelcolvin opened this issue Apr 8, 2024 · 0 comments · Fixed by #296
Closed

Segfault when using appender with Generated Columns #287

samuelcolvin opened this issue Apr 8, 2024 · 0 comments · Fixed by #296

Comments

@samuelcolvin
Copy link

samuelcolvin commented Apr 8, 2024

This may be related to #211, but I'm creating a new issue since:

  1. This the cause is somewhat different
  2. The SQL/logic here is completely valid, works fine with duckdb CLI

As far as I can tell, any/all generated columns cause appender.append_row to seg fault immediately (I'm running on M1 MacOS, using duckdb = { version = "0.10.1", features = ["bundled"] }).

Minimal reproduction:

fn main() -> Result<(), duckdb::Error> {
    let conn = duckdb::Connection::open_in_memory()?;
    conn.execute_batch(
        r"CREATE TABLE foo (
          foobar TEXT,
          foobar_split TEXT[] AS (split(trim(foobar), ','))
        );",
    )?;
    let mut appender = conn.appender("foo")?;
    appender.append_row(duckdb::params!["foo"])?;
    appender.flush();
    Ok(())
}

Output:

cargo r
    Finished dev [unoptimized + debuginfo] target(s) in 0.25s
     Running `/Users/samuel/code/testing/target/debug/testing`
zsh: segmentation fault  cargo r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant