Skip to content

FixedSizeBinaryArray::try_new(...) Panics with Item Length of Zero #8926

@tschwarzinger

Description

@tschwarzinger

Describe the bug

The following code snippet panics:

FixedSizeBinaryArray::new(0,  Buffer::default(), None)

// thread 'array::fixed_size_binary_array::tests::test_constructors' (63734) panicked at arrow-array/src/array/fixed_size_binary_array.rs:93:19:
// attempt to divide by zero

To Reproduce

Run the code from above.

Expected behavior

No panic.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow cratebug

    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