> Is it guaranteed that the rows are grouped by the value of the partition key? 
> That is, is it guaranteed that I'll get
Your primary key (k1, k2) is considered in type parts (partition_key , 
grouping_columns). In your case the primary_key is key and the grouping column 
in k2. Columns are ordered by the grouping columns, k2. 

See http://thelastpickle.com/2013/01/11/primary-keys-in-cql/

Cheers

-----------------
Aaron Morton
Freelance Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 12/04/2013, at 3:19 AM, Sorin Manolache <sor...@gmail.com> wrote:

> Hello,
> 
> Let us consider that we have a table t created as follows:
> 
> create table t(k1 vachar, k2 varchar, value varchar, primary key (k1, k2));
> 
> Its contents is
> 
> a m x
> a n y
> z 0 9
> z 1 8
> 
> and I perform a
> 
> select * from p where k1 in ('a', 'z');
> 
> Is it guaranteed that the rows are grouped by the value of the partition key? 
> That is, is it guaranteed that I'll get
> 
> a m x
> a n y
> z 0 9
> z 1 8
> 
> or
> 
> a n y
> a m x
> z 1 8
> z 0 9
> 
> or even
> 
> z 0 9
> z 1 8
> a n y
> a m x
> 
> but NEVER
> 
> a m x
> z 0 9
> a n y
> z 1 8
> 
> 
> Thank you,
> Sorin

Reply via email to