Skip to content

ES|QL: Add MV_DIFFERENCE function #141699

@ioanatia

Description

@ioanatia

Parent issue: #98545

Similar to MV_UNION and MV_INTERSECTION, we can add a MV_DIFFERENCE function.
This means we will cover all basic set operations: union, intersection, difference.

Given two arguments, MV_DIFFERENCE will return the values that are present only in the first argument.

Examples:

ROW a = [0, 1, 2, 3, 4, 5], b = [2, 3, 4, 5, 6]
| EVAL finalValue = MV_DIFFERENCE(a, b) // equal to [0, 1]
ROW a = [1,2, 3] , b = NULL
| EVAL finalValue = MV_DIFFERENCE(a, b) // equal to [1, 2, 3]
ROW a = NULL , b = [1, 2, 3]
| EVAL finalValue = MV_DIFFERENCE(a, b) // equal to NULL

References:

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions