You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
When a struct array is created with StructArray::try_new we determine the length based on the length of the first child array. If there are no child arrays then we infer a length of 0. Users can use StructArray::new_empty_fields to specify the length. This is perfectly valid but it has led to bugs. For example #7224
Describe the solution you'd like
We should return an error in StructArray::try_new if there are no child arrays provided and direct the user to call StructArray::new_empty_fields instead.
Describe alternatives you've considered
We can live with the status quo. It isn't wrong, just easy for bugs.
Additional context
This would be a breaking change.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
When a struct array is created with
StructArray::try_new
we determine the length based on the length of the first child array. If there are no child arrays then we infer a length of 0. Users can useStructArray::new_empty_fields
to specify the length. This is perfectly valid but it has led to bugs. For example #7224Describe the solution you'd like
We should return an error in
StructArray::try_new
if there are no child arrays provided and direct the user to callStructArray::new_empty_fields
instead.Describe alternatives you've considered
We can live with the status quo. It isn't wrong, just easy for bugs.
Additional context
This would be a breaking change.
The text was updated successfully, but these errors were encountered: