Skip to content

Failure in tableToIPC when using a v21.0.0 apache-arrow version than the dependency #2097

@VincenzoManto

Description

@VincenzoManto

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

  1. Use [email protected]
  2. Import [email protected] in the worker.
  3. Execute a query to get a Table result.
  4. Serialize the result with tableToIPC from v21.
  5. Deserialize the result with tableFromIPC from v21.
  6. Observe: The resulting table is empty.
  7. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions