cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrés de la Peña (JIRA) <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-13627) Index queries are rejected on COMPACT tables
Date Fri, 23 Jun 2017 17:05:00 GMT

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

Andrés de la Peña edited comment on CASSANDRA-13627 at 6/23/17 5:04 PM:
------------------------------------------------------------------------

The patch looks good to me, +1.

Just a couple of trivial comments that you could perfectly ignore or fix during commit:
 * It seems that [here|https://github.com/blerer/cassandra/blob/26e7ca7b1b0b0c493508cc6565e16d185323763d/test/unit/org/apache/cassandra/cql3/validation/entities/SecondaryIndexTest.java#L1306-L1308]
there are double spaces which are probably accidental. 
 * The insert statements in the newly created {{SecondaryIndexTest#testIndicesOnCompactTable}}
use an uppercase "%S" format specifier, which will produce the uppercased name of the table.
This is not a problem at all because the unquoted table name is case insensitive, but I'm
mentioning it just in case the choice of the uppercased format specifier were accidental.


was (Author: adelapena):
The patch looks good to me.

Just a couple of trivial comments:
 * It seems that [here|https://github.com/blerer/cassandra/blob/26e7ca7b1b0b0c493508cc6565e16d185323763d/test/unit/org/apache/cassandra/cql3/validation/entities/SecondaryIndexTest.java#L1306-L1308]
there are double spaces which are probably accidental. 
 * The insert statements in the newly created {{SecondaryIndexTest#testIndicesOnCompactTable}}
use an uppercase "%S" format specifier, which will produce the uppercased name of the table.
This is not a problem at all because the unquoted table name is case insensitive, but I'm
mentioning it just in case the choice of the uppercased format specifier were accidental.

> 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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message