jorgecarleitao commented on a change in pull request #9425:
URL: https://github.com/apache/arrow/pull/9425#discussion_r576408394



##########
File path: rust/arrow/src/array/array_list.rs
##########
@@ -139,7 +166,19 @@ impl<OffsetSize: OffsetSizeTrait> From<ArrayDataRef> for 
GenericListArray<Offset
             1,
             "ListArray should contain a single child array (values array)"
         );
-        let values = make_array(data.child_data()[0].clone());
+
+        let values = data.child_data()[0].clone();
+
+        if let Some(child) = Self::get_type(data.data_type()) {

Review comment:
       I agree with you. However, that requires a larger change as we would 
need to move from `From` to `TryFrom`, so for now I just want to avoid `unsafe` 
code by panicking everytime something may go wrong.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to