Array intersection set not empty


#1

Hi,

I have a case where I have to test if a cell of type array contains some values of an given array, so if there is a overlap (&& overlap operator on a postgres db).

Example:
[1,2,3] && [2,5,6] => true (both contains the 2, intersection set is not empty)

Is there a way to do this with mapd?

Best,
Peter


#2

Hi @pvoringer,

This should be able to be done in the open source by adding the right functions to QueryEngine/ExtensionFunctions.hpp. It may be more difficult to make the operator actually be && without some hacking of the Calcite parser (this would require more research).

Btw are you using the open source or the community edition?

Regards