cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <aa...@thelastpickle.com>
Subject Re: Query indexed column with key filter‏
Date Tue, 28 Jun 2011 22:47:34 GMT
Currently these are two different types of query, using a key range is equivalent to the get_range_slices()
API function and column clauses is a get_indexed_slices() call. So you would be asking for
a potentially painful join between.

Creating a column with the same value as the key sounds reasonable. 

Cheers
 
-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 29 Jun 2011, at 05:31, Daning wrote:

> I found this code
> 
>        // Start and finish keys, *and* column relations (KEY>  foo AND KEY<  bar
and name1 = value1).
>        if (select.isKeyRange()&&  (select.getKeyFinish() != null)&& 
(select.getColumnRelations().size()>  0))
>            throw new InvalidRequestException("You cannot combine key range and by-column
clauses in a SELECT");
> 
> in
> 
> http://svn.apache.org/repos/asf/cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
> 
> 
> This operation is exactly what I want - query by column then filter by key. I want to
know why this query is not supported, and what's the good work around for it? At this moment
my workaound is to create a column which is exactly same as key.
> 
> Thanks,
> 
> Daning


Mime
View raw message