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
{{ message }}
Repository navigation
array_concat fails with internal error on mixed List + LargeList inputs #21702
Calling array_concat with a mix of List and LargeList arguments hits an internal cast error:
>select array_concat(make_array(1, 2), arrow_cast([3, 4], 'LargeList(Int64)'));
DataFusion error: Internal error: could not cast array of type List(Int64) to arrow_array::array::list_array::GenericListArray<i64>.
The issue is in ArrayConcat::coerce_types (datafusion/functions-nested/src/concat.rs). It uses the return type's base element type to coerce items but leaves the container variant alone, so a List input isn't coerced to LargeList when the return type is LargeList. Then array_concat_inner tries to downcast the List array to GenericListArray<i64> and fails.
[1, 2, 3, 4] returned as LargeList(Int64) in both cases (the widest container variant).
Additional context
Surfaced while reviewing #21689, which rewrites concat(array, ...) to array_concat(array, ...) and inherits this limitation for concat(List, LargeList).
Activity
hcrosse commentedon Apr 17, 2026
take
fix: array_concat widens container variant for mixed List/LargeList i…