A representation of an Arrow Table in WebAssembly memory exposed as FFI-compatible structs through the Arrow C Data Interface.

Hierarchy

  • FFITable

Constructors

Methods

  • Get the pointer to one ArrowArray FFI struct for a given chunk index and column index

    Access the pointer to one ArrowArray struct representing one of the internal RecordBatches. This can be viewed or copied (without serialization) to an Arrow JS RecordBatch by using arrow-js-ffi. You can access the WebAssembly.Memory instance by using wasmMemory.

    Example:

    import * as arrow from "apache-arrow";
    import { parseRecordBatch } from "arrow-js-ffi";

    const wasmTable: FFITable = ...
    const wasmMemory: WebAssembly.Memory = wasmMemory();

    const jsBatches: arrow.RecordBatch[] = []
    for (let i = 0; i < wasmTable.numBatches(); i++) {
    // Pass `true` to copy arrays across the boundary instead of creating views.
    const jsRecordBatch = parseRecordBatch(
    wasmMemory.buffer,
    wasmTable.arrayAddr(i),
    wasmTable.schemaAddr(),
    true
    );
    jsBatches.push(jsRecordBatch);
    }
    const jsTable = new arrow.Table(jsBatches);

    Parameters

    • chunk: number

      number The chunk index to use

    Returns number

    number pointer to an ArrowArray FFI struct in Wasm memory

  • Returns void

  • Returns void

  • Get the total number of record batches in the table

    Returns number

  • Get the pointer to one ArrowSchema FFI struct

    Returns number

Generated using TypeDoc