Skip to content

Implement array_union function #6981

Closed
@izveigor

Description

@izveigor

Is your feature request related to a problem or challenge?

Summary

Characteristic Description
Function name: array_union
Aliases: list_union
Original function?: No
Function Description: Azure DataBricks: Returns an array of the elements in the union of array1 and array2 without duplicates.
Spark SQL: Returns an array of elements that are present in both arrays (all elements from both arrays) with out duplicates.
Sources: Concept Azure Spark

Examples:

select array_union([1, 2, 3, 4], [5, 6, 3, 4]);
----
[1, 2, 3, 4, 5, 6]
select array_union([1, 2, 3, 4], [5, 6, 7, 8]);
----
[1, 2, 3, 4, 5, 6, 7, 8]

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions