Love Arrays in Clickhouse!
At the moment, we are trying to engineer a solve that requires us to find whether elements in array1 exist in array2 regardless of the order.
For e.g.
array1= ['x','y','z']
array2= ['a','x','c']
Then the return that we want is [1,0,0]
- Is there a simple out-of-the-box way to accomplish this?
- This is part of a bigger query implying that the result from this array comparison will be used as part of the arrayMap((a,b) -> a*b, result, metric_array) -- more of an inline filtering.
- If there is any way this can be done, the performance will improve drastically!
Thanks in advance!