Skip to content

Commit 23544d4

Browse files
Update mv_contains_all docs to reflect the correct version and add lifecycle metadata
Documentation rewording. Co-authored-by: Liam Thompson <[email protected]>
1 parent bf837d9 commit 23544d4

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

docs/changelog/133099.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pr: 133099
2-
summary: Add MV_CONTAINS_ALL ES:QL function
2+
summary: Add MV_CONTAINS_ALL function
33
area: ES|QL
44
type: enhancement
55
issues: []

x-pack/plugin/esql/qa/testFixtures/src/main/resources/string.csv-spec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ l1:integer | l2:integer
19311931
null | 0
19321932
;
19331933

1934-
mvContainsAll#[skip:-9.2.99,reason:new mvContainsall function added in 9.3]
1934+
mvContainsAll#[skip:-9.1.99,reason:new mvContainsall function added in 9.2]
19351935
// tag::mv_contains_all[]
19361936
ROW a = "a", b = ["a", "b", "c"]
19371937
| EVAL a_subset_of_b = mv_contains_all(b, a)
@@ -1944,7 +1944,7 @@ a | [a, b, c] | true
19441944
// end::mv_contains_all-result[]
19451945
;
19461946

1947-
mvContainsAll_bothsides#[skip:-9.2.99,reason:new mvContainsall function added in 9.3]
1947+
mvContainsAll_bothsides#[skip:-9.1.99,reason:new mvContainsall function added in 9.2]
19481948
// tag::mv_contains_all_bothsides[]
19491949
ROW a = ["a","c"], b = ["a", "b", "c"]
19501950
| EVAL a_subset_of_b = mv_contains_all(b, a)
@@ -1957,7 +1957,7 @@ a:keyword | b:keyword | a_subset_of_b:boolean
19571957
// end::mv_contains_all_bothsides-result[]
19581958
;
19591959

1960-
mvContainsAllCombinations#[skip:-9.2.99,reason:new mvContainsall function added in 9.3]
1960+
mvContainsAllCombinations#[skip:-9.1.99,reason:new mvContainsall function added in 9.2]
19611961

19621962
ROW a = "a", b = ["a", "b", "c"], n = null
19631963
| EVAL aa = mv_contains_all(a, a),
@@ -1973,7 +1973,7 @@ a:keyword | b:keyword | n:null | aa:boolean | bb:boolean | ab:boolean | ba:boo
19731973
a | [a, b, c] | null | true | true | false | true | null | null | null
19741974
;
19751975

1976-
mvContainsAll_where#[skip:-9.2.99,reason:new mvContainsall function added in 9.3]
1976+
mvContainsAll_where#[skip:-9.1.99,reason:new mvContainsall function added in 9.2]
19771977
// tag::mv_contains_all_where[]
19781978
FROM airports
19791979
| WHERE mv_contains_all(type, ["major","military"]) AND scalerank == 9

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvContainsAll.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
import org.elasticsearch.xpack.esql.core.type.DataType;
2929
import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
3030
import org.elasticsearch.xpack.esql.expression.function.Example;
31+
import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
32+
import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
3133
import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
3234
import org.elasticsearch.xpack.esql.expression.function.Param;
3335
import org.elasticsearch.xpack.esql.planner.PlannerUtils;
@@ -52,12 +54,15 @@ public class MvContainsAll extends BinaryScalarFunction implements EvaluatorMapp
5254

5355
@FunctionInfo(
5456
returnType = "boolean",
55-
description = "Checks if the values yielded by multivalue value expression are all present in the values yielded by the other "
56-
+ "multivalue expression. The result is a boolean representing the outcome or null if either of the expressions where null.",
57+
description = "\"Checks if all values yielded by the second multivalue expression are present in the values yielded by " +
58+
"the first multivalue expression. Returns a boolean, or null if either expression is null.",
5759
examples = {
5860
@Example(file = "string", tag = "mv_contains_all"),
5961
@Example(file = "string", tag = "mv_contains_all_bothsides"),
60-
@Example(file = "string", tag = "mv_contains_all_where"), }
62+
@Example(file = "string", tag = "mv_contains_all_where"), },
63+
appliesTo = {
64+
@FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW, version = "9.2.0")
65+
}
6166
)
6267
public MvContainsAll(
6368
Source source,

0 commit comments

Comments
 (0)