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 2017/06/21 13:05:00 UTC
[jira] [Created] (CASSANDRA-13627) Index queries are rejected on
COMPACT tables
Benjamin Lerer created CASSANDRA-13627:
------------------------------------------
Summary: Index queries are rejected on COMPACT tables
Key: CASSANDRA-13627
URL: https://issues.apache.org/jira/browse/CASSANDRA-13627
Project: Cassandra
Issue Type: Bug
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