[
https://issues.apache.org/jira/browse/CASSANDRA-18892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17770459#comment-17770459
]
Mike Adamson commented on CASSANDRA-18892:
------------------------------------------
Patches and test runs are here:
|[4.0|https://github.com/apache/cassandra/pull/2753]|[CircleCI|https://app.circleci.com/pipelines/github/mike-tr-adamson/cassandra/301/workflows/49fae50f-5a55-4d7b-8af7-13b6d2251648]|
|[4.1|https://github.com/apache/cassandra/pull/2754]|[CircleCI|https://app.circleci.com/pipelines/github/mike-tr-adamson/cassandra/302/workflows/11e95c09-680b-4520-a3c4-b53223002ae7]|
|[5.0|https://github.com/apache/cassandra/pull/2750]|[CircleCI|https://app.circleci.com/pipelines/github/mike-tr-adamson/cassandra/298/workflows/9f9294d8-0025-438a-a93b-0f8f5a06a900]|
|[trunk|https://github.com/apache/cassandra/pull/2752]|[CircleCI|https://app.circleci.com/pipelines/github/mike-tr-adamson/cassandra/299/workflows/42674922-f4ca-4cb9-ad4e-d99d8f749a44]|
> Distributed tests can return ordering columns that have not been selected
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-18892
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18892
> Project: Cassandra
> Issue Type: Bug
> Components: Test/dtest/java
> Reporter: Mike Adamson
> Assignee: Mike Adamson
> Priority: Normal
>
> The following test fails
> {code:java}
> @Test
> public void incorrectClusteringColumnTest() throws IOException
> {
> try (Cluster cluster = init(Cluster.build(1).start()))
> {
> cluster.schemaChange(withKeyspace("CREATE TABLE %s.t (k int, c int, v
> int, primary key(k, c))"));
> cluster.coordinator(1).execute(withKeyspace("INSERT INTO %s.t (k, c,
> v) VALUES (0, 1, 2)"), ConsistencyLevel.QUORUM);
> String query = withKeyspace("SELECT v FROM %s.t WHERE k IN (0, 1)
> ORDER BY c LIMIT 10");
> assertRows(cluster.coordinator(1).execute(query,
> ConsistencyLevel.ONE), row(2));
> }
> }
> {code}
> The query is returning the clustering column c as well as the regular column
> v.
> The reason for the extra column being returned is that the RowUtil is using
> ResultMessage.Rows.result.metadata.names instead on
> ResultMessage.Rows.result.metadata.requestNames(). This last method removes
> columns that have not been requested.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]