cql3 - In cassandra cqlsh, how do I select from map<ascii, ascii> in a table? -


basically here how table set up:

create table points (   name ascii,   id varint,   attributes map<ascii, ascii>,   primary key (name, id) ) 

and if run following select statement returned:

select id, attributes points limit 5;

   id | attributes   ----+------------------------------------------     1 | {station/name: abc, type: 2, pfreq: 101}     2 | {station/name: abc, type: 1, pfreq: 101}     3 | {station/name: def, type: 1, pfreq: 103}     4 | {station/name: ghi, type: 2, pfreq: 105}     5 | {station/name: ghi, type: 1, pfreq: 105} 

what able form clause based on info inside of attributes. following statement:

select id points name = 'name' , attributes['pfreq'] = 101;

however, when run following error:

bad request: line 1:56 no viable alternative @ input '['

i looked @ this discussion , seems though not supported yet, true? or there way filter on attributes information?

here versions working with:

[cqlsh 4.1.1 | cassandra 2.0.7 | cql spec 3.1.1 | thrift protocol 19.39.0] 

yes true, instead can use contains:

select * points attributes contains 101; 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -