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

ESQL: function/operator to check if any value of a multivalue field matches #120782

Open
alex-spies opened this issue Jan 24, 2025 · 1 comment
Open
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@alex-spies
Copy link
Contributor

Description

There are use cases where we want to check if a multvalued field e.g. contains a particular value. Currently, the == operator does not support this as a multivalue for either of the operands results in a null (mentioned in the docs, too).

One workaround is to use MV_EXPAND, but this changes the number of rows and loses information about which values were once part of the same multvalue. This was, for instance, not adequate for (this SIEM case).

What we probably need is something like an any_equals function (and all_equals, most likely) - or some sort of ANY/ALL modifiers, e.g. WHERE ANY mv_field == "single_value". (The exact semantics of ANY/ALL are unclear in case we compose multiple operators/functions, though.)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jan 24, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

2 participants