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

Prepared statements fail with arrowIPCAll #113

Open
domoritz opened this issue Aug 21, 2024 · 2 comments
Open

Prepared statements fail with arrowIPCAll #113

domoritz opened this issue Aug 21, 2024 · 2 comments

Comments

@domoritz
Copy link

const duckdb = require("duckdb");
const db = new duckdb.Database(":memory:");

const con = db.connect();

const stmt = con.prepare("SELECT ?::INTEGER AS fortytwo");

stmt.arrowIPCAll(42, function (err, res) {
  if (err) {
    console.warn(err);
  } else {
    console.log(res);
  }
});

crashes with

Assertion failed: (chunk.ColumnCount() == 2), function Callback, file statement.cpp, line 387.

DuckDB 1.0.0.

@domoritz
Copy link
Author

Happens in

D_ASSERT(chunk.ColumnCount() == 2);

@csjh
Copy link

csjh commented Oct 2, 2024

possible fix would be to move the to_arrow_ipc query wrapping from Connection.prototype.arrowIPCAll to Statement.prototype.arrowIPCAll

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

No branches or pull requests

2 participants