istvan-fodor opened a new pull request, #5541:
URL: https://github.com/apache/arrow-rs/pull/5541
# Which issue does this PR close?
Closes #1353
# Rationale for this change
`FixedSizeListBuilder` doesn't allow users to specify the inner field of
elements and defaults to the following FieldRef: `Arc::new(Field::new("item",
values_data.data_type().clone(), true))`
We would like to keep the default behavior as-is, but also
# What changes are included in this PR?
1. Added `with_field` to `FixedSizeListBuilder`, copied over from
`GenericListBuilder`
2. Added new `field: Option<FieldRef>` to `FixedSizeListBuilder`
3. Implemented field logic patterned after `GenericListBuilder` in
`finish()` and `finish_build()`
4. Changed unsafe build to safe build (see user-facing changes)
5. Unit tests for 3 scenarios:
1. `with_field` used
2. `with_field` used with non-nullable field, expect panic
3. `with_field` used with wrong type, expect panic
# Are there any user-facing changes?
Yes.
The `finish_cloned()` and `finish()` methods no longer use the
`build_unchecked()` method, but rely on `build()`. If the build fails, the
thread panics.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]