All Implemented Interfaces:
NamedWriteable, Writeable, Resolvable, EvaluatorMapper

public class MvContains extends BinaryScalarFunction implements EvaluatorMapper
Function that takes two multivalued expressions and checks if values of one expression(subset) are all present(equals) in the other (superset). Duplicates are ignored in the sense that for each duplicate in the subset, we will search/match against the first/any value in the superset.

Given Set A = {"a","b","c"} and Set B = {"b","c"}, the relationship between first (row) and second (column) arguments is:

  • A, B ⇒ true (A ⊆ B)
  • B, A ⇒ false (A ⊈ B)
  • A, A ⇒ true (A ≡ A)
  • B, B ⇒ true (B ≡ B)
  • A, null ⇒ true (B ⊆ ∅)
  • null, A ⇒ false (∅ ⊈ B)
  • B, null ⇒ true (B ⊆ ∅)
  • null, B ⇒ false (∅ ⊈ B)
  • null, null ⇒ true (∅ ≡ ∅)