Can a primary key in Cassandra contain a collection column? -


can primary key in cassandra contain collection column?

example:

create table person (   first_name text,   emails set<text>,   description text    primary key (first_name, emails) ); 

collection types cannot part of primary key, , neither can counter type. can test yourself, reason might not obvious.

sets, list, maps hacks on top of storage model (but don’t mean in negative way). set number of columns same key prefix. part of primary key value must scalar, , collection types aren’t.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -