Select values from map with multiple key values in where clause

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Select values from map with multiple key values in where clause

mrulli
This post has NOT been accepted by the mailing list yet.
Hello!
I have a table like the following

CREATE TABLE test (
    my_id uuid,
    values map<UUID, FROZEN <value_reference> >,
    PRIMARY KEY (my_id)
)...

and I would like to perform a query along these lines:
SELECT * FROM test WHERE my_id = 670287fe-e080-42c3-9fae-7ffdc3309793 AND values CONTAINS KEY {00000000-0000-0000-0000-000000000001, 00000000-0000-0000-0000-000000000002};

Is this possible?

If the answer is no, the other approach I tried is via UDF. So the second question is:

Is it possible to use UDF in where clause?

Reading the https://issues.apache.org/jira/browse/CASSANDRA-8488 issue I fear the answer is still no, right?

As a last chance, I'm considering implementing a custom secondary index: is this a viable approach to get the kind of SELECT detailed above?

Many thanks,
matteo