[
https://issues.apache.org/jira/browse/CASSANDRA-13017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Lerer updated CASSANDRA-13017:
---------------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.2.x)
(was: 2.1.x)
2.2.9
2.1.17
Reproduced In: 2.2.8, 2.1.13 (was: 2.1.13, 2.2.8)
Status: Resolved (was: Ready to Commit)
Committed into 2.1 at 70e8b39b021b0abae69009c4a034657e2518e09e and merged into
2.2
> DISTINCT queries on partition keys and static column might not return all the
> results
> -------------------------------------------------------------------------------------
>
> Key: CASSANDRA-13017
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13017
> Project: Cassandra
> Issue Type: Bug
> Components: CQL
> Reporter: Benjamin Lerer
> Assignee: Benjamin Lerer
> Fix For: 2.1.17, 2.2.9
>
>
> In {{2.1}} and {{2.2}}, a {{DISTINCT}} query on partition keys and static
> columns might not return all the data if some rows have no data and the
> static columns have also no values.
> The problem can be reproduced using the Java driver with the following code:
> {code}
> session = cluster.connect();
> session.execute("CREATE KEYSPACE IF NOT EXISTS test WITH REPLICATION
> = {'class' : 'SimpleStrategy', 'replication_factor' : '1'}");
> session.execute("USE test");
> session.execute("DROP TABLE IF EXISTS test");
> session.execute("CREATE TABLE test (pk int, c int, v int, s int
> static, primary key(pk, c))");
> PreparedStatement prepare = session.prepare("INSERT INTO test (pk, c,
> v, s) VALUES (?, ?, ?, ?)");
> for (int i = 0; i < 10; i++)
> for (int j = 0; j < 1; j++)
> session.execute(prepare.bind(i, j, null, null));
> for (Row row : session.execute(new SimpleStatement("SELECT DISTINCT
> token(pk), pk, s FROM test").setFetchSize(2)))
> {
> System.out.println(row);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)