Jefffrey commented on code in PR #9274:
URL: https://github.com/apache/arrow-rs/pull/9274#discussion_r2749136379


##########
arrow-cast/src/cast/list.rs:
##########
@@ -82,14 +82,15 @@ where
     OffsetSize: OffsetSizeTrait,
 {
     let array = array.as_fixed_size_list();
-    if to.data_type() != &array.value_type() {
+    let (inner_field, size) = if let DataType::FixedSizeList(inner_field, 
size) = array.data_type()
+    {
+        (inner_field, size)
+    } else {
+        unreachable!()
+    };

Review Comment:
   Thanks, applied 👍 



##########
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:
   Let me play around with that idea



-- 
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]

Reply via email to