Skip to content

Commit 5584a93

Browse files
committed
Fix MvContains javadoc
1 parent f71848f commit 5584a93

File tree

1 file changed

+37
-1
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue

1 file changed

+37
-1
lines changed

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

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,43 @@
4646
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isType;
4747

4848
/**
49-
* Reduce a multivalued field to a single valued field containing the count of values.
49+
* Function that takes two multi valued expressions and checks if values of one expression are all present(equals) in the other.
50+
* <ul>
51+
* <li>Set A = {"a","b","c"}</li>
52+
* <li>Set B = {"b","c"}</li>
53+
* </ul>
54+
* <table style="border-spacing: 0;">
55+
* <th>
56+
* <td></td><td colspan=3> Second Argument </td>
57+
* </th>
58+
* <tr>
59+
* <td></td>
60+
* <td></td>
61+
* <td> A </td>
62+
* <td> B </td>
63+
* <td> null </td>
64+
* </tr>
65+
* <tr>
66+
* <td rowspan=3> First <br/> Argument</td>
67+
* <td> A </td>
68+
* <td style="border: thin solid; padding: 5px"> true </td>
69+
* <td style="border: thin solid; padding: 5px"> true </td>
70+
* <td style="border: thin solid; padding: 5px"> true </td>
71+
* </tr>
72+
* <tr>
73+
* <td> B </td>
74+
* <td style="border: thin solid; padding: 5px"> false </td>
75+
* <td style="border: thin solid; padding: 5px"> true </td>
76+
* <td style="border: thin solid; padding: 5px"> true </td>
77+
* </tr>
78+
* <tr>
79+
* <td> null </td>
80+
* <td style="border: thin solid; padding: 5px"> false </td>
81+
* <td style="border: thin solid; padding: 5px"> false </td>
82+
* <td style="border: thin solid; padding: 5px"> true </td>
83+
* </tr>
84+
* </table>
85+
*
5086
*/
5187
public class MvContains extends BinaryScalarFunction implements EvaluatorMapper {
5288
public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(

0 commit comments

Comments
 (0)