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

Benjamin Lerer reassigned CASSANDRA-8275:
-----------------------------------------

    Assignee: Benjamin Lerer

> Some queries with multicolumn relation do not behave properly when secondary 
> index is used
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8275
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8275
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>
> In the case where we perform a select using a multicolumn relation over 
> multiple columns that use a secondary index the error message returned is 
> wrong.
> The following unit test can be use to reproduce the problem:
> {code}
>     @Test
>     public void testMultipleClusteringWithIndex() throws Throwable
>     {
>         createTable("CREATE TABLE %s (a int, b int, c int, d int, PRIMARY KEY 
> (a, b, c, d))");
>         createIndex("CREATE INDEX ON %s (b)"); 
>         
>         execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 0, 0, 0, 
> 0);
>         execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 0, 0, 1, 
> 0);
>         execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 0, 0, 1, 
> 1);
>         execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 0, 1, 0, 
> 0);
>         execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 0, 1, 1, 
> 0);
>         execute("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 0, 1, 1, 
> 1);
>         assertRows(execute("SELECT * FROM %s WHERE (b) = (?)", 1),
>                    row(0, 1, 0, 0),
>                    row(0, 1, 1, 0),
>                    row(0, 1, 1, 1)
>                );
>         
>         assertRows(execute("SELECT * FROM %s WHERE (b, c) = (?, ?) ALLOW 
> FILTERING", 1, 1),
>                    row(0, 1, 1, 0),
>                    row(0, 1, 1, 1)
>                );
>     }
> {code}



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

Reply via email to