Skip to content

Incorrect value in error message from GenericListArray::try_new_from_array_data #526

@jhorstmann

Description

@jhorstmann

Describe the bug
The error message should report the number of buffers instead of the arrays length:

if data.buffers().len() != 1 {
    return Err(ArrowError::InvalidArgumentError(
        format!("ListArray data should contain a single buffer only (value offsets), had {}",
                data.len())));
}

To Reproduce
Try to create a ListArray using ArrayDataBuilder and make_array, but forgetting to add a buffer.

Expected behavior
Error message should contain the actual number of buffers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions