Jefffrey commented on code in PR #9274:
URL: https://github.com/apache/arrow-rs/pull/9274#discussion_r2749255319
##########
arrow-cast/src/cast/list.rs:
##########
@@ -212,6 +212,55 @@ where
Ok(Arc::new(array))
}
+pub(crate) fn cast_list_view_to_fixed_size_list<O: OffsetSizeTrait>(
+ array: &dyn Array,
+ field: &FieldRef,
+ size: i32,
+ cast_options: &CastOptions,
+) -> Result<ArrayRef, ArrowError> {
+ let array = array.as_list_view::<O>();
+
+ let nullable = cast_options.safe || array.null_count() != 0;
+ let mut nulls = nullable.then(|| {
Review Comment:
`NullBufferBuilder` approach here:
https://github.com/apache/arrow-rs/pull/9274/changes/d28dc92f6193566364dc44d75f20762b2e8c7cac
Introduces `NullBufferBuilder::set_bit`
Maybe using `take` can be a followup issue
--
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]