isEqualSet
This section contains reference documentation for the isEqualSet function.
Last updated
Was this helpful?
This section contains reference documentation for the isEqualSet function.
Compares two multi-value columns (treated as sets) and returns true if they contain the same elements, regardless of order. Returns false if either argument is null.
isEqualSet(mvCol1, mvCol2)
mvCol1
Multi-value
First collection
mvCol2
Multi-value
Second collection
Returns: BOOLEAN
SELECT isEqualSet(tags, categories) AS sameSet
FROM myTableReturns true when the tags and categories multi-value columns contain exactly the same set of values.
SELECT isEqualSet(
ARRAY_SORT_INT(arrayA),
ARRAY_SORT_INT(arrayB)
) AS sameSet
FROM myTableTwo empty collections are considered equal. If either argument is null, the function returns false.
Last updated
Was this helpful?
Was this helpful?

