Skip to content

GenericListViewArray::new_null ignores len and returns an empty array #8904

@dqkqd

Description

@dqkqd

Describe the bug

GenericListViewArray::new_null return empty arrays regardless of length.

To Reproduce

new_null constructs an array with empty offsets and sizes results in empty array.

pub fn new_null(field: FieldRef, len: usize) -> Self {
let values = new_empty_array(field.data_type());
Self {
data_type: Self::DATA_TYPE_CONSTRUCTOR(field),
nulls: Some(NullBuffer::new_null(len)),
value_offsets: ScalarBuffer::from(vec![]),
value_sizes: ScalarBuffer::from(vec![]),
values,
}
}

Expected behavior

The array length equals the len argument.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow cratebug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions