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

Benjamin Lerer commented on CASSANDRA-13627:
--------------------------------------------

I pushed some patches for 
[3.0|https://github.com/apache/cassandra/compare/trunk...blerer:13627-3.0] and 
[trunk|https://github.com/apache/cassandra/compare/trunk...blerer:13627-trunk]. 
I ran the test on our internal CI for {{3.0}}, {{3.11}} and {{trunk}}. There 
are no unit test failures and the DTests failure are unrelated to the patches.

The patches make make sure that {{Selection::containsStaticColumns}} and 
{{SelectStatement::selectOnlyStaticColumns}} (in trunk) return the correct 
value for static compact tables.    

> Index queries are rejected on COMPACT tables
> --------------------------------------------
>
>                 Key: CASSANDRA-13627
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13627
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>
> Since {{3.0}}, {{compact}} tables are using under the hood {{static}} 
> columns. Due to that {{SELECT}} queries using secondary indexes get rejected 
> with the following error:
> {{Queries using 2ndary indexes don't support selecting only static columns}}.
> This problem can be reproduced using the following unit test:
> {code}    @Test
>     public void testIndicesOnCompactTable() throws Throwable
>     {
>         createTable("CREATE TABLE %s (pk int PRIMARY KEY, v int) WITH COMPACT 
> STORAGE");
>         createIndex("CREATE INDEX ON %s(v)");
>         execute("INSERT INTO %S (pk, v) VALUES (?, ?)", 1, 1);
>         execute("INSERT INTO %S (pk, v) VALUES (?, ?)", 2, 1);
>         execute("INSERT INTO %S (pk, v) VALUES (?, ?)", 3, 3);
>         assertRows(execute("SELECT pk, v FROM %s WHERE v = 1"),
>                    row(1, 1),
>                    row(2, 1));
>     }{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to