Query on map values ​​in Kassandra

Suppose I have a family of columns like this:

CREATE TABLE test(
id text,
meta map <text, text>,
PRIMARY KEY (key)
);

Then I put some data on my meta strong> map , for example:{'username' : 'ivan'}

I would like to query my family of test columns for items in the meta map . Something like that:

SELECT * FROM test WHERE meta['username'] = 'ivan';

According to the cassandra documentation, this should be possible:

As its name implies, a map maps one thing to another. A map is a name and a pair of typed values. Using the card type, you can store information related to the timestamp in user profiles. Each map item is internally stored as one Cassandra column, which you can change, replace, delete, and execute a query.

, ?

,

+3
1

, select, where. .

+1

All Articles