UNNEST on Empty Array does not seem to be supported ( multiselect component )

I am trying to use multiselect with big query, and the provided suggestion in documentation to handle empty value ( no option selected ) in multiselect does not seem to be valid while using UNNEST
While empty values in dropdowns are handled by including {{!input.value}} OR column={{input.value}} this does not work for UNNEST, is there any work around to make UNNEST work with empty arrays, I’ve tried CASE and IF scripting to make UNNEST conditional but seems like that part of query is always executed.

Hi @hardeepmonty!

I don't think that BigQuery actually ignores everything after the or, so it doesn't like to unnest an empty array.

This might work for you :blush:

select * from <TABLE_NAME_HERE> where {{ !multiselect1.value.length }} or customer.full_company_name IN UNNEST({{ !multiselect1.value.length ? [""] : multiselect1.value }})