You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
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[1,2,3]]
Targeted Type: List(List(Int32))
Current result: ListArray[ListArray[PrimitiveArray[1], PrimitiveArray[2], PrimitiveArray[3]]]
Expected result: ListArray[ListArray[PrimitiveArray[1,2,3]]
Describe the solution you'd like
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.
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
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[1,2,3]]
Targeted Type: List(List(Int32))
Current result: ListArray[ListArray[PrimitiveArray[1], PrimitiveArray[2], PrimitiveArray[3]]]
Expected result: ListArray[ListArray[PrimitiveArray[1,2,3]]
Describe the solution you'd like
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
Additional context
This feature is helpful for apache/datafusion#6849
Self-assigned
The text was updated successfully, but these errors were encountered: