Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement array_has_any function #6976

Closed
izveigor opened this issue Jul 15, 2023 · 0 comments · Fixed by #6990
Closed

Implement array_has_any function #6976

izveigor opened this issue Jul 15, 2023 · 0 comments · Fixed by #6990
Labels
enhancement New feature or request

Comments

@izveigor
Copy link
Contributor

izveigor commented Jul 15, 2023

Is your feature request related to a problem or challenge?

Summary

Characteristic Description
Function name: array_has_any
Aliases: list_has_any
Original function?: No
Function Description: PostgreSQL: Do the arrays overlap, that is, have any elements in common?
Azure DataBricks: Returns true if the intersection of array1 and array2 is not empty.
Clickhouse: Checks whether two arrays have intersection by some elements.
DuckDB: Returns true if any elements exist is both lists.
Sources: Concept PostgreSQL Azure ClickHouse DuckDB

Examples:

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

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant