Skip to content

[Bug](Executor) ARRAY_UNION with empty left array and nested-array right input reaches BE and fails with Unexpected columns #65356

Description

@HappenLee

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions