SetUnion / List Layer
Compute the set union between two variable-length lists. Returns a list containing all unique elements from both lists. Similar to Python's set union operation or SQL's UNION.
Mathematical definition: For sets A and B, the union A ∪ B is defined as: In other words, elements that are in either A or B (or both).
Example transformation:
left_list | right_list | union |
---|---|---|
[1, 2, 3] | [2, 4, 5] | [1, 2, 3, 4, 5] |
[a, b, c] | [b, d] | [a, b, c, d] |
[1, 1, 2] | [2, 3] | [1, 2, 3] |
[x, y] | [] | [x, y] |
[1, null, 3] | [1, 2] | [1, 2, 3] |
Properties:
- Commutative:
- Associative:
- Identity:
- Idempotent:
Common applications:
- Combining feature sets
- Merging permission lists
- Aggregating categories
- Consolidating tag sets
- Building complete catalogs
- Creating comprehensive listings
Note: Duplicates in input lists are removed (set semantics). Null values are ignored. Order of elements in result is not guaranteed. Lists can have different lengths.
SelectLeft
columnThe first list column (SelectLeft
) for union. Examples:
- Basic features: [search, filter, sort]
- Group A permissions: [read, write]
- Primary categories: [books, music] Lists can have different lengths. Duplicates allowed but treated as single elements.
SelectRight
columnThe second list column (SelectRight
) for union. Examples:
- Premium features: [export, import, sync]
- Group B permissions: [execute, delete]
- Secondary categories: [movies, games] Lists can have different lengths. Duplicates allowed but treated as single elements.
AsColumn
nameName for the new column. If not provided, the system generates a unique name. If AsColumn
matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.