-
Notifications
You must be signed in to change notification settings - Fork 168
Open
Description
What happens?
When serializing a Table object from connection.query() using tableToIPC, the process fails silently if the imported apache-arrow version doesn't match the one duckdb-wasm depends on (e.g., using Arrow v21 with duckdb-wasm v1.30.0 which needs Arrow v17).
tableToIPC runs without errors, but tableFromIPC on the main thread produces an empty Table. This is difficult to debug as there is no explicit error.
To Reproduce
- Use
[email protected] - Import
[email protected]in the worker. - Execute a query to get a Table result.
- Serialize the result with
tableToIPCfrom v21. - Deserialize the result with
tableFromIPCfrom v21. - Observe: The resulting table is empty.
- Compare: Repeat with
[email protected]; the table deserializes correctly.
// A minimal test case
import * as duckdb from 'https://cdn.jsdelivr.net/npm/@duckdb/[email protected]/+esm';
import { Table, tableToIPC, tableFromIPC } from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'; // Fails
// import { Table, tableToIPC, tableFromIPC } from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'; // Works
// ... (DB init) ...
const queryResult = await conn.query(`SELECT 1 AS a`);
const serialized = tableToIPC(new Table(queryResult.chunks));
const deserialized = tableFromIPC(serialized);
console.log(`Rows found: ${deserialized.numRows}`); // Logs 0 with v21, 1 with v17
Browser/Environment:
Chrome 139
Device:
HP Pavilion
DuckDB-Wasm Version:
1.30.0
DuckDB-Wasm Deployment:
worker
Full Name:
Vincenzo Manto
Affiliation:
None
Metadata
Metadata
Assignees
Labels
No labels