You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Terry Liu (JIRA)" <ji...@apache.org> on 2016/03/29 17:47:25 UTC

[jira] [Updated] (CASSANDRA-11454) 2.2 Documentation conflicts with observed behavior

     [ https://issues.apache.org/jira/browse/CASSANDRA-11454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Terry Liu updated CASSANDRA-11454:
----------------------------------
    Description: 
Cassandra 2.1 allowed you to LIMIT a COUNT and have it mean that the query would return as soon as it found enough rows to fulfill your limit.

For example,
{noformat}
SELECT COUNT(*)
FROM some_table
LIMIT 1
{noformat}

would always return a count of 1 as long as there is at least one row in the table.

I've noticed that Cassandra 2.2 no longer behaves in this way and yet the documentation continues to suggest otherwise:
http://docs.datastax.com/en/cql/3.3/cql/cql_reference/select_r.html?scroll=reference_ds_d35_v2q_xj__specifying-rows-returned-using-limit

Cassandra 2.2 seems to return the full count despite what you set the LIMIT to.

Looking through the version changes, it seems likely that the changes for the following note might be related (from https://docs.datastax.com/en/cassandra/2.2/cassandra/features.html):
{noformat}
Allow count(*) and count(1) to be use as normal aggregation
count() can now be used in aggregation.
{noformat}

If so, the related ticket seems to be https://issues.apache.org/jira/browse/CASSANDRA-10114.

  was:
Cassandra 2.1 allowed you to LIMIT a COUNT and have it mean that the query would return as soon as it found enough rows to fulfill your limit.

For example,
{noformat}
SELECT COUNT(*)
FROM some_table
LIMIT 1
{noformat}

would always return a count of 1 as long as there is at least one row in the table.

I've noticed that Cassandra 2.2 no longer behaves in this way and yet the documentation continues to suggest otherwise:
http://docs.datastax.com/en/cql/3.3/cql/cql_reference/select_r.html?scroll=reference_ds_d35_v2q_xj__specifying-rows-returned-using-limit

Cassandra 2.2 seems to return the true count despite what you set the LIMIT to.

Looking through the version changes, it seems likely that the changes for the following note might be related (from https://docs.datastax.com/en/cassandra/2.2/cassandra/features.html):
{noformat}
Allow count(*) and count(1) to be use as normal aggregation
count() can now be used in aggregation.
{noformat}

If so, the related ticket seems to be https://issues.apache.org/jira/browse/CASSANDRA-10114.


> 2.2 Documentation conflicts with observed behavior
> --------------------------------------------------
>
>                 Key: CASSANDRA-11454
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11454
>             Project: Cassandra
>          Issue Type: Task
>          Components: Documentation and Website
>         Environment: CentOS 6.6
> [cqlsh 5.0.1 | Cassandra 2.2.5 | CQL spec 3.3.1 | Native protocol v4]
>            Reporter: Terry Liu
>            Priority: Minor
>
> Cassandra 2.1 allowed you to LIMIT a COUNT and have it mean that the query would return as soon as it found enough rows to fulfill your limit.
> For example,
> {noformat}
> SELECT COUNT(*)
> FROM some_table
> LIMIT 1
> {noformat}
> would always return a count of 1 as long as there is at least one row in the table.
> I've noticed that Cassandra 2.2 no longer behaves in this way and yet the documentation continues to suggest otherwise:
> http://docs.datastax.com/en/cql/3.3/cql/cql_reference/select_r.html?scroll=reference_ds_d35_v2q_xj__specifying-rows-returned-using-limit
> Cassandra 2.2 seems to return the full count despite what you set the LIMIT to.
> Looking through the version changes, it seems likely that the changes for the following note might be related (from https://docs.datastax.com/en/cassandra/2.2/cassandra/features.html):
> {noformat}
> Allow count(*) and count(1) to be use as normal aggregation
> count() can now be used in aggregation.
> {noformat}
> If so, the related ticket seems to be https://issues.apache.org/jira/browse/CASSANDRA-10114.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)