You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Mike Hugo <mi...@piragua.com> on 2012/08/15 21:21:31 UTC
Composite Column Slice query, wildcard first component?
Hello,
Given a row like this
"key1" => (A:A:C), (A:A:B), (B:A:C), (B:C:D)
Is there a way to create a slice query that returns all columns where the
_second_ component is A? That is, I would like to get back the following
columns by asking for columns where component[0] = * and component[1] = A
(A:A:C), (A:A:B), (B:A:C)
I could do some iteration and figure this out in more of a brute force
manner, I'm just curious if there's anything built in that might be more
efficient
Thanks!
Mike
Re: Composite Column Slice query, wildcard first component?
Posted by aaron morton <aa...@thelastpickle.com>.
> Is there a way to create a slice query that returns all columns where the _second_ component is A?
No.
You can only get a contiguous slice of columns.
Cheers
-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com
On 16/08/2012, at 7:21 AM, Mike Hugo <mi...@piragua.com> wrote:
> Hello,
>
> Given a row like this
>
> "key1" => (A:A:C), (A:A:B), (B:A:C), (B:C:D)
>
> Is there a way to create a slice query that returns all columns where the _second_ component is A? That is, I would like to get back the following columns by asking for columns where component[0] = * and component[1] = A
>
> (A:A:C), (A:A:B), (B:A:C)
>
> I could do some iteration and figure this out in more of a brute force manner, I'm just curious if there's anything built in that might be more efficient
>
> Thanks!
>
> Mike