You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (JIRA)" <ji...@apache.org> on 2015/02/22 21:51:11 UTC

[jira] [Resolved] (CASSANDRA-8810) incorrect indexing of list collection

     [ https://issues.apache.org/jira/browse/CASSANDRA-8810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Lerer resolved CASSANDRA-8810.
---------------------------------------
    Resolution: Duplicate

> incorrect indexing of list collection
> -------------------------------------
>
>                 Key: CASSANDRA-8810
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8810
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: windows 8
>            Reporter: 007reader
>             Fix For: 2.1.4
>
>
> in a table with one indexed field type list<text> ,data  retrieval is not working properly:
> I have a simple table with an indexed list<text> field, but it shows unexpected behavior when I query the list. 
>  {code}
> create table test (whole text PRIMARY KEY, parts list<text>);
> create index on test (parts);
> insert into test (whole,parts) values('a', ['a']);      
> insert into test (whole,parts) values('b', ['b']);      
> insert into test (whole,parts) values('c', ['c']);      
> insert into test (whole,parts) values('a.a', ['a','a']);
> insert into test (whole,parts) values('a.b', ['a','b']);
> insert into test (whole,parts) values('a.c', ['a','c']);
> insert into test (whole,parts) values('b.a', ['b','a']);
> insert into test (whole,parts) values('b.b', ['b','b']);
> insert into test (whole,parts) values('b.c', ['b','c']);
> insert into test (whole,parts) values('c.c', ['c','c']);
> insert into test (whole,parts) values('c.b', ['c','b']);
> insert into test (whole,parts) values('c.a', ['c','a']);{code}
> This is expected behavior:
> ------------------------------------------
> select * from test where parts contains 'a' ALLOW FILTERING;
>  whole | parts
> -------+------------
>      a |      ['a']
>    b.a | ['b', 'a']
>    a.c | ['a', 'c']
>    a.b | ['a', 'b']
>    a.a | ['a', 'a']
>    c.a | ['c', 'a']
> From the following query I expect a subset of the previous query result, but it returns no data
> ---------------------------------------------------
> select * from test where parts contains 'a' and parts contains 'b' ALLOW FILTERING;
>  whole | parts
> -------+------- 



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