Skip to content

Implement array_has function #6977

Closed
@izveigor

Description

@izveigor

Is your feature request related to a problem or challenge?

Summary

Characteristic Description
Function name: array_has
Aliases: list_has, array_contains, list_contains
Original function?: No
Function Description: Azure DataBricks: Returns true if array contains value.
Clickhouse: Checks whether the ‘arr’ array has the ‘elem’ element. Returns 0 if the element is not in the array, or 1 if it is.
DuckDB: Returns true if the list contains the element.
Sources: Concept Azure ClickHouse DuckDB

Examples:

select array_has([1, 2, 3, 4], 3);
----
true
select array_has([1, 2, 3, 4], 5);
----
false

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