Describe the bug
Calling compute::take on a struct array with zero fields results in an array with length == 0, regardless of the length of the take array.
Expected behavior
The result should be a struct array with no fields and length == take_indices.len()
Additional context
In my own code I've found it too easy to drop struct array lengths. I wonder if it's worth:
Describe the bug Calling
compute::take
on a struct array with zero fields results in an array with length == 0, regardless of the length of the take array.Expected behavior The result should be a struct array with no fields and length == take_indices.len()
Additional context In my own code I've found it too easy to drop struct array lengths. I wonder if it's worth:
StructArray::try_new(fields, arrays, nulls, length)
StructArray::try_new(fields, arrays, nulls)
return an error for empty fields instead of picking a default length