vegarsti commented on code in PR #8735:
URL: https://github.com/apache/arrow-rs/pull/8735#discussion_r2472729028


##########
arrow-array/src/array/list_view_array.rs:
##########
@@ -454,6 +457,35 @@ impl<OffsetSize: OffsetSizeTrait> std::fmt::Debug for 
GenericListViewArray<Offse
     }
 }
 
+impl<OffsetSize: OffsetSizeTrait> From<GenericListArray<OffsetSize>>
+    for GenericListViewArray<OffsetSize>
+{
+    fn from(value: GenericListArray<OffsetSize>) -> Self {
+        let field = match value.data_type() {
+            DataType::List(f) | DataType::LargeList(f) => Some(f.clone()),
+            _ => None,
+        }
+        .expect("Expected infallible creation of GenericListViewArray from 
GenericList failed");

Review Comment:
   Not 100% sure about this, tried to follow the pattern from below (line 505) 
in `impl<OffsetSize: OffsetSizeTrait> From<ArrayData> for 
GenericListViewArray<OffsetSize>`



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