mv_contains.md 881 B

% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.

Examples

ROW set = ["a", "b", "c"], element = "a"
| EVAL set_contains_element = mv_contains(set, element)
set:keyword element:keyword set_contains_element:boolean
[a, b, c] a true
ROW setA = ["a","c"], setB = ["a", "b", "c"]
| EVAL a_subset_of_b = mv_contains(setB, setA)
| EVAL b_subset_of_a = mv_contains(setA, setB)
setA:keyword setB:keyword a_subset_of_b:boolean b_subset_of_a:boolean
[a, c] [a, b, c] true false
FROM airports
| WHERE mv_contains(type, ["major","military"]) AND scalerank == 9
| KEEP scalerank, name, country
scalerank:integer name:text country:keyword
9 Chandigarh Int'l India