Skip to content

Implement array_remove_all function #7075

@izveigor

Description

@izveigor

Is your feature request related to a problem or challenge?

Summary

Characteristic Description
Function name: array_remove_all
Aliases: list_remove_all
Original function?: No
Function Description: PostgreSQL: remove all elements equal to the given value from the array (array must be one-dimensional).
Azure DataBricks: Removes all occurrences of element from array.
Spark SQL: Returns an array after removing all provided 'value' from the given array. Concept: Removes all elements from the array equal to the given value.
Sources: Concept PostgreSQL Azure Spark

Examples:

❯ select array_remove_all([1, 2, 2, 3, 2, 1, 4], 2);
+--------------------------------------------------+
| array_remove_all(List([1,2,2,3,2,1,4]),Int64(2)) |
+--------------------------------------------------+
| [1, 3, 1, 4]                                     |
+--------------------------------------------------+

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