[
https://issues.apache.org/jira/browse/CASSANDRA-8302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tyler Hobbs updated CASSANDRA-8302:
-----------------------------------
Reviewer: Benjamin Lerer
> 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
> Fix For: 2.1.3
>
>
> 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)