datalens-tech/datalens

Selector for array fields

timka-s opened this issue · 0 comments

Add the ability to create selectors for arrays (like from function - SPLIT(Tags, ', ')), or fix unnest array filtration)
Show unnest([array_field]) in selector values, but filter any([array_field]) in (%selected values%)

Details:
If we have string field like Tags
image

We can create selector with Tags
image
Or with UNNEST(SPLIT([Tags], ', '))
image

But, if we choice unnest value, we will receive error - "set-returning functions are not allowed in WHERE"
SQL: ... unnest(string_to_array(t4.Tags, ', ')) = 'owner' ...

On the other side, filtration for SPLIT(Tags, ', ') works fine:
image
SQL: ... 'owner' = ANY(string_to_array(t4.Tags, ', ')) ...