Closed blaginin closed 1 day ago
That was a very fast review 😅🙏
query error DataFusion error: type_coercion\ncaused by\nError during planning: Incompatible inputs for Union: Previous inputs were of type List(.*), but got incompatible type List(.*) on column 'x'
SELECT make_array(2) x UNION ALL SELECT make_array(now()) x;
query ?
select make_array(arrow_cast(2, 'UInt8')) x UNION ALL SELECT make_array(arrow_cast(-2, 'Int8')) x;
----
[-2]
[2]
The queries has nothing to do with the list coercion. I checked the query and it already works correctly in main branch.
@jayzhan211 are you good to merge this PR?
Thanks @blaginin @alamb @findepi
Which issue does this PR close?
Closes #12291
Rationale for this change
Currently, we don't attempt to coerce inner list types, and so this works (although it shouldn't)
What changes are included in this PR?
Now we’ll try to coerce inner types instead of just using the type of the first array.
Are these changes tested?
Yes, added a test
Are there any user-facing changes?
No