v.25.3New Feature
Add function arraySymmetricDifference
Added functionarraySymmetricDifference. It returns all elements from multiple array arguments which do not occur in all arguments. Example:SELECT arraySymmetricDifference([1, 2], [2, 3])returns[1, 3]. (issue #61673). #76231 (Filipp Abapolov).
Why it matters
This function allows users to find elements that are unique to one or more arrays, effectively performing a symmetric difference operation across multiple arrays. It simplifies queries that need to identify non-common elements among arrays, enhancing array manipulation capabilities in ClickHouse.How to use it
Use thearraySymmetricDifference function by passing multiple arrays as arguments. For example:SELECT arraySymmetricDifference([1, 2], [2, 3])This returns
[1, 3], the elements not common to both arrays.