jayzhan211 opened a new issue, #4483: URL: https://github.com/apache/arrow-rs/issues/4483
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*) --> Currently, the implementation of typecasting in the ListArray assumes that the inner elements have the same dimension as the targeted ListArray. However, there is a need to support nested list casting, where the internal elements can have a different dimension than the targeted ListArray. For example, Array: ListArray[PrimitiveArray<Int32>[1,2,3]] Targeted Type: List(List(Int32)) Current result: ListArray[ListArray[PrimitiveArray<Int32>[1], PrimitiveArray<Int32>[2], PrimitiveArray<Int32>[3]]] Expected result: ListArray[ListArray[PrimitiveArray<Int32>[1,2,3]] **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> Casting List to the same dimensions first, then cast the inner primitive type. *Only casting from lower dimension to high dimension is allowed*. Additional: Adding `fn get_list_dimension` for DataType::List is also helpful. **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> **Additional context** <!-- Add any other context or screenshots about the feature request here. --> This feature is helpful for https://github.com/apache/arrow-datafusion/issues/6849 -- 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]
