Jefffrey commented on code in PR #10228:
URL: https://github.com/apache/arrow-rs/pull/10228#discussion_r3487222354
##########
arrow-cast/src/cast/list.rs:
##########
@@ -67,19 +67,6 @@ pub(crate) fn cast_values_to_list_view<O: OffsetSizeTrait>(
Ok(Arc::new(list))
}
-/// Same as [`cast_values_to_list`] but output fixed size list array with
element
-/// size 1.
-pub(crate) fn cast_values_to_fixed_size_list(
- array: &dyn Array,
- to: &FieldRef,
- size: i32,
- cast_options: &CastOptions,
-) -> Result<ArrayRef, ArrowError> {
- let values = cast_with_options(array, to.data_type(), cast_options)?;
- let list = FixedSizeListArray::try_new(to.clone(), size, values, None)?;
- Ok(Arc::new(list))
-}
-
Review Comment:
This is a drive-by refactor; I inlined it where it's used because it was
slightly confusing that the docstring stated its for size 1 (and indeed at its
only usage size is only 1) but we accept an arbitrary `size`
--
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]