You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Josh McKenzie (Jira)" <ji...@apache.org> on 2020/04/18 19:47:00 UTC
[jira] [Updated] (CASSANDRA-13147) Secondary index query on
partition key columns might not return all the rows.
[ https://issues.apache.org/jira/browse/CASSANDRA-13147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh McKenzie updated CASSANDRA-13147:
--------------------------------------
Bug Category: Parent values: Correctness(12982)Level 1 values: API / Semantic Implementation(12988)
> Secondary index query on partition key columns might not return all the rows.
> -----------------------------------------------------------------------------
>
> Key: CASSANDRA-13147
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13147
> Project: Cassandra
> Issue Type: Bug
> Components: Feature/2i Index
> Reporter: Benjamin Lerer
> Assignee: Andres de la Peña
> Priority: Normal
> Fix For: 2.1.18, 2.2.10, 3.0.13, 3.11.0, 4.0
>
>
> A secondary index query on a partition key column will, apparently, not return the empty partitions with static data.
> The following unit test can be used to reproduce the problem.
> {code}
> public void testIndexOnPartitionKeyWithStaticColumnAndNoRows() throws Throwable
> {
> createTable("CREATE TABLE %s (pk1 int, pk2 int, c int, s int static, v int, PRIMARY KEY((pk1, pk2), c))");
> createIndex("CREATE INDEX ON %s (pk2)");
> execute("INSERT INTO %s (pk1, pk2, c, s, v) VALUES (?, ?, ?, ?, ?)", 1, 1, 1, 9, 1);
> execute("INSERT INTO %s (pk1, pk2, c, s, v) VALUES (?, ?, ?, ?, ?)", 1, 1, 2, 9, 2);
> execute("INSERT INTO %s (pk1, pk2, s) VALUES (?, ?, ?)", 2, 1, 9);
> execute("INSERT INTO %s (pk1, pk2, c, s, v) VALUES (?, ?, ?, ?, ?)", 3, 1, 1, 9, 1);
> assertRows(execute("SELECT * FROM %s WHERE pk2 = ?", 1),
> row(1, 1, 1, 9, 1),
> row(1, 1, 2, 9, 2),
> row(2, 1, null, 9, null), <-- is not returned
> row(3, 1, 1, 9, 1));
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org