[
https://issues.apache.org/jira/browse/CASSANDRA-20027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brandon Williams updated CASSANDRA-20027:
-----------------------------------------
Bug Category: Parent values: Correctness(12982)Level 1 values: Recoverable
Corruption / Loss(12986)
Complexity: Normal
Component/s: CQL/Semantics
Discovered By: User Report
Fix Version/s: 5.0.x
5.x
Severity: Normal
Status: Open (was: Triage Needed)
> Cassandra 5 min() and max() results incorrect when cluster order desc
> ---------------------------------------------------------------------
>
> Key: CASSANDRA-20027
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20027
> Project: Cassandra
> Issue Type: Bug
> Components: CQL/Semantics
> Reporter: Jay Aurthur
> Priority: Normal
> Fix For: 5.0.x, 5.x
>
> Attachments: image-2024-10-24-13-57-26-947.png
>
>
> Given:
> CREATE TABLE min_max_bigint_desc(id text, created bigint, PRIMARY KEY (id,
> created)) WITH CLUSTERING ORDER BY (created DESC);
> CREATE TABLE min_max_bigint_asc(id text, created bigint, PRIMARY KEY (id,
> created)) WITH CLUSTERING ORDER BY (created ASC);
> SELECT * FROM min_max_bigint_asc;
> id | created
> ----+---------
> 0 | 1
> 0 | 2
> 0 | 3
>
> and data in both tables for both Cassandra 5 and 4, the same:
>
> SHOW VERSION;SELECT id,min(created),max(created) FROM min_max_bigint_asc
> WHERE id='0';SELECT id,min(created),max(created) FROM min_max_bigint_desc
> WHERE id='0';
> [cqlsh 6.2.0 | Cassandra 5.0.2 | CQL spec 3.4.7 | Native protocol v5]
> id | system.min(created) | system.max(created)
> ----+---------------------+---------------------
> 0 | 1 | 3
>
> id | system.min(created) | system.max(created)
> ----+---------------------+---------------------
> 0 | 3 | 1
>
> [cqlsh 6.1.0 | Cassandra 4.1.7 | CQL spec 3.4.6 | Native protocol v5]
> id | system.min(created) | system.max(created)
> ----+---------------------+---------------------
> 0 | 1 | 3
>
> id | system.min(created) | system.max(created)
> ----+---------------------+---------------------
> 0 | 1 | 3
>
> bigint and timestamp column types have the same behavior, and likely others
> but not explicitly verified.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]