finos / perspective

A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
https://perspective.finos.org/
Apache License 2.0
7.72k stars 1.04k forks source link

Creating a table using arrow buffer fails with Table initialization failed: Error: Abort(): Could not load arrow column of type `time64` #2611

Open aszenz opened 1 month ago

aszenz commented 1 month ago

Bug Report

Table initialization failed: Error: Abort(): Could not load arrow column of type time64

Steps to Reproduce:

Loading an arrow table with a time like value 12:00

const worker = perspective.worker();
const timeArray = [
    65, 82, 82, 79, 87, 49, 0, 0, 255, 255, 255, 255, 144, 0, 0, 0, 16, 0, 0, 0, 0, 0, 10, 0, 12, 0, 6, 0,
    5, 0, 8, 0, 10, 0, 0, 0, 0, 1, 4, 0, 12, 0, 0, 0, 8, 0, 8, 0, 0, 0, 4, 0, 8, 0, 0, 0, 4, 0, 0, 0, 1, 0,
    0, 0, 20, 0, 0, 0, 16, 0, 20, 0, 8, 0, 6, 0, 7, 0, 12, 0, 0, 0, 16, 0, 16, 0, 0, 0, 0, 0, 1, 9, 16, 0,
    0, 0, 52, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111,
    110, 95, 97, 114, 114, 105, 118, 97, 108, 95, 116, 105, 109, 101, 0, 0, 0, 0, 8, 0, 12, 0, 6, 0, 8, 0,
    8, 0, 0, 0, 0, 0, 2, 0, 64, 0, 0, 0, 255, 255, 255, 255, 136, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 12, 0,
    22, 0, 6, 0, 5, 0, 8, 0, 12, 0, 12, 0, 0, 0, 0, 3, 4, 0, 24, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
    0, 24, 0, 12, 0, 4, 0, 8, 0, 10, 0, 0, 0, 60, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 235, 14, 10, 0, 0, 0,
    255, 255, 255, 255, 0, 0, 0, 0, 16, 0, 0, 0, 12, 0, 20, 0, 6, 0, 8, 0, 12, 0, 16, 0, 12, 0, 0, 0, 0, 0,
    4, 0, 60, 0, 0, 0, 40, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 160, 0, 0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 0, 0, 0,
    0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 0, 4, 0, 8, 0, 0, 0, 4, 0,
    0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 16, 0, 20, 0, 8, 0, 6, 0, 7, 0, 12, 0, 0, 0, 16, 0, 16, 0, 0, 0, 0, 0, 1,
    9, 16, 0, 0, 0, 52, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 100, 101, 115, 116, 105, 110, 97, 116,
    105, 111, 110, 95, 97, 114, 114, 105, 118, 97, 108, 95, 116, 105, 109, 101, 0, 0, 0, 0, 8, 0, 12, 0, 6,
    0, 8, 0, 8, 0, 0, 0, 0, 0, 2, 0, 64, 0, 0, 0, 192, 0, 0, 0, 65, 82, 82, 79, 87, 49,
];
const d = new Uint8Array(timeArray)
const _table = worker.table(d.buffer);

Expected Result:

Interpret the value as a string value if the lib doesn't support time64

Actual Result:

Table initialization failed: Error: Abort(): Could not load arrow column of type time64

Environment:

Using the current wasm version of the lib 2.10.0

Additional Context:

The arrow table is generated via duckdb.