Skip to content

bug(node): can't pass null to nullable boolean field #2644

@wjones127

Description

@wjones127

LanceDB version

v0.22.0

What happened?

There seems to be a bug in the Arrow conversion. These should be solved to null in the Arrow arrays.

Are there known steps to reproduce?

const lancedb = require('@lancedb/lancedb');
const arrow = require('apache-arrow');

(async () => {
    const conn = await lancedb.connect("memory://");
    const schema = new arrow.Schema([
        new arrow.Field("test", new arrow.Bool(), true),
    ]);
    const table = await conn.createEmptyTable("test_table", schema);
    await table.add([{ test: null }])
})();
[Error: lance error: LanceError(Arrow): Arrow error: Invalid argument error: Need at least 1 bytes for bitmap in buffers[0] in array of type Boolean, but got 0, /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lance-datafusion-0.35.0/src/utils.rs:49:31  Caused by: LanceError(Arrow): Arrow error: Invalid argument error: Need at least 1 bytes for bitmap in buffers[0] in array of type Boolean, but got 0, /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lance-datafusion-0.35.0/src/utils.rs:49:31] {
  code: 'GenericFailure'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerstypescriptTypescript / javascript

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions