Skip to content
This repository was archived by the owner on May 2, 2022. It is now read-only.
This repository was archived by the owner on May 2, 2022. It is now read-only.

"unreachable" error when trying to load data with a dimension of all empty/null values #78

@mfulop

Description

@mfulop

When trying to load data with a dimension column with all empty string values, eg.

import Engine from '@chartshq/datamodel' // used version v3.0.0

async function f () {
  const DataModel = await Engine.onReady()
  const fd = await DataModel.loadData(
    [ { d1: '' } ], // d1: null also fails
    [ { name: 'd1', type: 'dimension' as any } ],
    {}
  )
  const dm = new DataModel(fd)
}

... an error is thrown on load:

    RuntimeError: unreachable
        at wasm-function[167]:0x242f5
        at wasm-function[188]:0x24886
        at wasm-function[192]:0x2493f
        at wasm-function[182]:0x24738
        at wasm-function[27]:0x15eab
        at wasm-function[20]:0x12a24
        at wasm-function[19]:0x12760

      at T.add_field (node_modules/@chartshq/datamodel/dist/node/2.datamodel.js:1:50456)
      at Rt (node_modules/@chartshq/datamodel/dist/node/2.datamodel.js:1:24606)
      at t.createField (node_modules/@chartshq/datamodel/dist/node/2.datamodel.js:1:30596)

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