cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-8302) Filtering for CONTAINS (KEY) on frozen collection clustering columns within a partition does not work
Date Wed, 19 Nov 2014 09:11:33 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-8302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14217626#comment-14217626
] 

Benjamin Lerer commented on CASSANDRA-8302:
-------------------------------------------

+1

> Filtering for CONTAINS (KEY) on frozen collection clustering columns within a partition
does not work
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8302
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8302
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tyler Hobbs
>            Assignee: Tyler Hobbs
>            Priority: Minor
>             Fix For: 2.1.3
>
>         Attachments: 8302.txt
>
>
> Create a table like this:
> {noformat}
> CREATE TABLE foo (
>     a int,
>     b int,
>     c frozen<set<int>>
>     d int,
>     PRIMARY KEY (a, b, c, d)
> )
> {noformat}
> and add an index on it:
> {noformat}
> CREATE INDEX ON foo(b)
> {noformat}
> A query across all partitions will work correctly:
> {noformat}
> cqlsh:ks1> insert into foo (a, b, c, d) VALUES (0, 0, {1, 2}, 0);
> cqlsh:ks1> SELECT * FROM foo WHERE b=0 AND c CONTAINS 2 and d=0 ALLOW FILTERING;
>  a | b | c      | d
> ---+---+--------+---
>  0 | 0 | {1, 2} | 0
> (1 rows)
> {noformat}
> But if the query is restricted to a single partition, it is considered invalid (and the
error message isn't great):
> {noformat}
> cqlsh:ks1> SELECT * FROM foo WHERE a=0 AND b=0 AND c CONTAINS 2 and d=0 ALLOW FILTERING;
> code=2200 [Invalid query] message="No secondary indexes on the restricted columns support
the provided operators: "
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message