Joining on multivalue fields (Comparison Rules)
Last updated
Last updated
You can specify fields that are lists, maps or variants as Join keys (see ) just like any other fields. The only question is when two fields are equal.
A list/map/variant can:
be null
- its value is not specified;
contain empty elements
contain n elements - an ordinary case described, e.g. in .
variant can contain a single value or a multivalue type
Two maps/lists/variants are equal if both of them are not null
, they have the same data type, element count and all element values (keys-values in maps) are equal.
Two maps/lists/variants are not equal if either of them is null
.
Warning!
When comparing two lists, the order of their elements has to match, too. In maps and variants, there is no 'order' of elements, therefore you cannot use them in Sort key.
Example 9. Integer lists which are (not) equal - symbolic notation
[1,2] == [1,2]
[null] != [1,2]
[1] != [1,2]
null != null // two unspecified lists
[null] == [null] // an extra case: lists which are not empty but whose elements are null