Hi there

We have a requirement to check if an element is in a column of type array
(I have also tried using Multiset)

Here is an example to illustrate the scenario:
Employee table with a field called tags which can contain [“tag1”, “tag2”]

In MySQL an equivalent query to check if a value is present in the tags
would be something like:
Select * from Employees where ‘tag1’ in tags

This would return all employees that contain tag1 in their tags.

We are using the sql standard default operator of calcite. I saw that the
spark dialect supports array_contains but is there an equivalent support in
the sql please? How can we achieve this?

Thanks
Dipika

Reply via email to