tustvold commented on PR #4484:
URL: https://github.com/apache/arrow-rs/pull/4484#issuecomment-1632940715

   So currently if both lhs and rhs are List or LargeList, the code will call 
`cast_list_inner`. This performs an element-wise cast of the underlying list 
values.
   
   If the types are mixed List and LargeList with the same value type, the code 
will call `cast_list_container`. This performs a cast of the list offsets. The 
story is similar for `FixedSizeList`.
   
   Otherwise if the left hand side is not a list, and the right hand side is a 
list, it calls `cast_primitive_to_list`. This first performs a cast of the 
values if necessary, and then proceeds to construct a set of list offsets such 
that each list element has a length of 1.
   
   i.e. `[1, 2] -> [[1], [2]]` and `[[1, 2], [3, 4]] -> [[[1, 2]], [[3, 4]]]`
   
   Importantly this preserves a property that at least appears to hold for the 
cast kernel that `input.len() == output.len()`
   
   
[#4511](https://github.com/apache/arrow-rs/pull/4511/files#diff-50ca33c0aee08395003926d3f7c2d7ee6d90199dea0f2642856cfac201e27a68R9425)
 adds an explicit test of this case.
   
   I therefore think this PR as written represents a breaking change, I think 
we probably need to add this as a separate nest kernel or something. I will 
have a think


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