You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Сергей Нагайцев <mc...@gmail.com> on 2013/11/08 12:58:08 UTC
IN predicates on non-primary-key columns (%s) is not yet supported -
then will it be ?
CREATE COLUMNFAMILY post (
KEY uuid,
author uuid,
blog uuid,
name text,
data text,
PRIMARY KEY ( KEY )
);
SELECT * FROM post WHERE blog IN (1,2) AND author=3 ALLOW FILTERING;
(don't look at fact numbers are not uuids :)
Error: IN predicates on non-primary-key columns (blog) is not yet supported
And how to workaround this ?
Manual index tables ? Any guidelines how to design them ?
Re: IN predicates on non-primary-key columns (%s) is not yet
supported - then will it be ?
Posted by "Laing, Michael" <mi...@nytimes.com>.
try this:
CREATE COLUMNFAMILY post (
KEY uuid,
author uuid,
blog timeuuid, -- sortable
name text,
data text,
PRIMARY KEY ( KEY, blog )
);
create index on post (author);
SELECT * FROM post
WHERE
blog >= 4d6b5fc5-487b-11e3-a6f4-406c8f1838fa
AND blog <= 50573ef8-487b-11e3-be65-406c8f1838fa
AND author= a6c9f405-487b-11e3-bd38-406c8f1838fa
;
works if blog can be modeled this way...
ml
On Fri, Nov 8, 2013 at 6:58 AM, Сергей Нагайцев <mc...@gmail.com> wrote:
> CREATE COLUMNFAMILY post (
> KEY uuid,
> author uuid,
> blog uuid,
> name text,
> data text,
> PRIMARY KEY ( KEY )
> );
>
> SELECT * FROM post WHERE blog IN (1,2) AND author=3 ALLOW FILTERING;
> (don't look at fact numbers are not uuids :)
>
> Error: IN predicates on non-primary-key columns (blog) is not yet supported
>
> And how to workaround this ?
> Manual index tables ? Any guidelines how to design them ?
>