jkosh44 commented on PR #14532:
URL: https://github.com/apache/datafusion/pull/14532#issuecomment-2641819030

   This is failing CI for the following reason. 
   
   Previously, in `get_valid_types()` functions with the array signature 
`ArrayAndIndexes` and `Array` would convert top level `FixedSizeList`s to 
`List`s; nested `FixedSizeList`s would not be changed. However, functions with 
the array signature `ArrayAndElement`, `ElementAndArray`, and 
`ArrayAndElementAndOptionalIndex` would recursively convert `FixedSizeList`s to 
`List`s.
   
   So for example, if we had the type `FixedSizeList(FixedSizeList(Int64))`, 
`ArrayAndIndexes` would convert this to `List(FixedSizeList(Int64))` but 
`ArrayAndElement` would convert this to `List(List(Int64))`.
   
   This PR modifies the logic of `get_valid_types()` so that we always 
recursively convert `FixedSizeList`s to `List`s. So 
`FixedSizeList(FixedSizeList(Int64))` is always converted to 
`List(List(Int64))`.
   
   There's a test, `test_array_element_return_type_fixed_size_list()`, that 
essentially asserts that `get_valid_types()` returns 
`List(FixedSizedList(Int32))` for the `array_element` function, which used to 
have the `ArrayAndIndexes` signature. This test now fails because the 
`FixedSizedList` is converted to a `List` recursively.
   
   I don't understand the old behavior, and why it was different for different 
function signatures. So I'm having trouble figuring out what the new behavior 
should be. We could of course sniff out the functions arguments to see if we 
have `[array, index+]` and if so only replace top level `FixedSizedList` with 
`List`, but I wouldn't understand why that's correct.
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to