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


##########
arrow-cast/src/cast/mod.rs:
##########
@@ -864,9 +877,41 @@ pub fn cast_with_options(
             let array = array.as_list::<i64>();
             cast_list_to_fixed_size_list::<i64>(array, field, *size, 
cast_options)
         }
-        (List(_) | LargeList(_), _) => match to_type {
+        (ListView(_), List(_)) => match to_type {
+            List(list_to) => cast_list_view_values::<i32>(array, list_to, 
cast_options),
+            _ => Err(ArrowError::CastError(
+                "Cannot cast list view to non-list data types".to_string(),
+            )),
+        },
+        (LargeListView(_), LargeList(_)) => match to_type {

Review Comment:
   Indeed! Thanks!



##########
arrow-cast/src/cast/mod.rs:
##########
@@ -153,7 +153,20 @@ pub fn can_cast_types(from_type: &DataType, to_type: 
&DataType) -> bool {
         (List(list_from) | LargeList(list_from), FixedSizeList(list_to, _)) => 
{
             can_cast_types(list_from.data_type(), list_to.data_type())
         }
+        (List(list_from), ListView(list_to)) => {

Review Comment:
   Thanks!



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