|
45 | 45 | import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isRepresentableExceptCounters; |
46 | 46 | import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isType; |
47 | 47 |
|
48 | | -/// Function that takes two multivalued expressions and checks if values of one expression are all present(equals) in the other. |
49 | | -/// |
50 | | -/// - Set A = {"a","b","c"} |
51 | | -/// - Set B = {"b","c"} |
52 | | -/// |
53 | | -/// <table style="border-spacing: 0;"> |
54 | | -/// <th> |
55 | | -/// <td></td><td colspan=3> Second Argument </td> |
56 | | -/// </th> |
57 | | -/// <tr> |
58 | | -/// <td></td> |
59 | | -/// <td></td> |
60 | | -/// <td> A </td> |
61 | | -/// <td> B </td> |
62 | | -/// <td> null </td> |
63 | | -/// </tr> |
64 | | -/// <tr> |
65 | | -/// <td rowspan=3> First |
66 | | -/// 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> |
| 48 | +/** |
| 49 | + * Function that takes two multivalued expressions and checks if values of one expression are all present(equals) in the other. |
| 50 | + * <p> |
| 51 | + * Given Set A = {"a","b","c"} and Set B = {"b","c"}, the relationship between first (row) and second (column) arguments is: |
| 52 | + * <ul> |
| 53 | + * <li>A, B ⇒ true (A ⊆ B)</li> |
| 54 | + * <li>B, A ⇒ false (A ⊈ B)</li> |
| 55 | + * <li>A, A ⇒ true (A ≡ A)</li> |
| 56 | + * <li>B, B ⇒ true (B ≡ B)</li> |
| 57 | + * <li>A, null ⇒ true (B ⊆ ∅)</li> |
| 58 | + * <li>null, A ⇒ false (∅ ⊈ B)</li> |
| 59 | + * <li>B, null ⇒ true (B ⊆ ∅)</li> |
| 60 | + * <li>null, B ⇒ false (∅ ⊈ B)</li> |
| 61 | + * <li>null, null ⇒ true (∅ ≡ ∅)</li> |
| 62 | + * </ul> |
| 63 | + */ |
85 | 64 | public class MvContains extends BinaryScalarFunction implements EvaluatorMapper { |
86 | 65 | public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry( |
87 | 66 | Expression.class, |
|
0 commit comments