Description
ARRAY_UNION fails on the backend when the left argument is an empty array and the right argument contains nested arrays. The expression reaches the BE and then reports an error like Unexpected columns.
Discussion Summary
- The issue occurs when
ARRAY_UNION is used with an empty left array and a nested-array right input.
- Related functions already support nested arrays; for example,
array_distinct(array_concat([[[1], [2]]], ...)) returns nested arrays.
- Extending the BE implementation of
ARRAY_UNION to properly handle nested-array inputs is preferable to adding FE-side restrictions.
Expected Behavior
ARRAY_UNION should either return a clean result for nested-array inputs or be rejected cleanly at the FE/BE boundary if unsupported. The current failure happens inside the BE, which is not user-friendly.
Description
ARRAY_UNIONfails on the backend when the left argument is an empty array and the right argument contains nested arrays. The expression reaches the BE and then reports an error likeUnexpected columns.Discussion Summary
ARRAY_UNIONis used with an empty left array and a nested-array right input.array_distinct(array_concat([[[1], [2]]], ...))returns nested arrays.ARRAY_UNIONto properly handle nested-array inputs is preferable to adding FE-side restrictions.Expected Behavior
ARRAY_UNIONshould either return a clean result for nested-array inputs or be rejected cleanly at the FE/BE boundary if unsupported. The current failure happens inside the BE, which is not user-friendly.