incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <sor...@gmail.com>
Subject partition key of composite type and "where partition_key in (...)" clause
Date Wed, 05 Jun 2013 13:29:19 GMT
Hello,

Is it possible to use the "where partition_key in (...)" clause if the 
partition key has a composite type?

I have a schema as follows:

create table tbl (
    k1 int,
    k2 varchar,
    k3 varchar,
    m blob,
    primary key((k1, k2), k3)
)

I would like to be able to do something like

select m from tbl where (k1, k2) in ((0, 'abc'), (1, 'xyz'));

I think though that I'll have to use the more verbose

begin unlogged batch
select m from tbl where k1=0 and k2='abc'
select m from tbl where k1=1 and k2='xyz'
apply batch;

Thanks,
Sorin

Mime
View raw message