alamb commented on issue #7142:
URL: 
https://github.com/apache/arrow-datafusion/issues/7142#issuecomment-1817891855

   I think it would help in the situation above to keep the types and values 
separate and I think the logic should be able to handle it.
   
   So I think from the parser `[[[1]], null, [null], [[3, 4]]]` would be (not 
that I purposely listed the "null"literal as "wildcard" type to avoid 
confusion, even if the actual type is DataType::Null. It can be cast to any 
other type)
   ```
   [[1]] type = list(list(i64)), value = 1 element list [1]
   null type =wildcard, value = null
   [null] type = list(int32), value = 1 element list of null
   [[3, 4]] type = list(list(int32)) value = 1 element list [3, 4]
   ```
   
   So the code needs to determine the output type ONLY based on the input types:
   ```
   list(list(i64))
   wildcard
   list(int32)
   list(list(int32))
   ```
   
   Which should be `list(list(i64))`
   
   And then the coercion code needs to try and cast each value to 
`list(list(i64))`, which is possible in this case


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