Skip to content

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

@tobixdev

Description

@tobixdev

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions