First some terminology, when you say range slice do you mean getting multiple rows? Or do you mean get_slice where you return multiple super columns from one row?
Your examples looks like you want to get multiple super columns from one row. In which case the choice of partitioner is not important. The comparator and sub comparator as specified in the CF definition control the ordering of colums. If possible i would suggest using the random partitioner. Could you provide examples of how you are doing the queries using pycassa we may be able to help. My initial guess is that the ranges you specify for the query are not correct when using ASCII ordering for column names, e,g, 20031210 < 20031210022059/190209-20031210-4476885-s/z is true 20031210022059/190209-20031210-4476885-s/z < 20031210 is not true Trying appending the highest value ASCII character to the end of 20031210 Cheers Aaron On 18/02/2011, at 4:35 AM, Shotaro Kamio <kamios...@gmail.com> wrote: > Hi, > > We are in trouble with a strange behavior in cassandra 0.7.2 (also > happened in 0.7.0). Could someone help us? > > The problem happens on a column family of super column type named "Order". > Data structure is something like: > Order[ a_key ][ date + "/" + order_id + "/" (+ suffix) ][attribute] = value > > For example, > Order[ "100" ][ "20031210022059/190209-20031210-4476885-s/" ] > is a super column. > Because we want to scan them in the latest-first order, range slice > query with reversed order is used. (Partitioner is > ByteOrderedPartitioner). > > In some supercolumns in my cassandra instance, reversed query returns > no result while it should have results. > For instance, > > * Range slice in normal (lexical)-order ( Order[ "100" ] [ from > "20031210" to "20031210022059/190209-20031210-4476885-s/z" ] ) will > return results correctly. > > col='20031210014347/190209-20031210-4476668-s/' > col='20031210014347/190209-20031210-4476668-s/0' > col='20031210022059/190209-20031210-4476885-s/' > col='20031210022059/190209-20031210-4476885-s/0' > > * Range slice in reversed (latest-first)-order ( Order[ "100" ] [ from > "20031210022059/190209-20031210-4476885-s/z" to "20031210" ] ) will > return NO result! > > Note that the super column name > "20031210022059/190209-20031210-4476885-s/z" doesn't exist. The query > should work. And, it succeeds in other super columns. > > * Range slice in reversed (latest-first)-order starting from existing > column name ( Order[ "100" ] [ from > "20031210022059/190209-20031210-4476885-s/0" to "20031210" ] ) will > return results which should return. > > Both pycassa and hector show the same behavior on the same column > name. I guess that cassandra has some logical error. > > > I'll appreciate any help. > > > Best reagards, > Shotaro