You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by bl...@apache.org on 2015/09/22 20:54:57 UTC

[1/2] cassandra git commit: Add a NEWS.txt entry about LIMIT behavior change and unit tests

Repository: cassandra
Updated Branches:
  refs/heads/trunk b283eac15 -> 56d81ac53


Add a NEWS.txt entry about LIMIT behavior change and unit tests

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10380


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/96eb58a0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/96eb58a0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/96eb58a0

Branch: refs/heads/trunk
Commit: 96eb58a0fb6ac6dd4ba438120b2cd2725e815e95
Parents: c95a709
Author: blerer <be...@datastax.com>
Authored: Tue Sep 22 20:44:49 2015 +0200
Committer: blerer <be...@datastax.com>
Committed: Tue Sep 22 20:49:48 2015 +0200

----------------------------------------------------------------------
 NEWS.txt                                                         | 3 +++
 .../cassandra/cql3/validation/operations/AggregationTest.java    | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/96eb58a0/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 924c35f..67398cf 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -44,6 +44,9 @@ New features
 
 Upgrading
 ---------
+   - The LIMIT clause applies now only to the number of rows returned to the user,
+     not to the number of row queried. By consequence, queries using aggregates will not
+     be impacted by the LIMIT clause anymore.
    - The native protocol versions 1 and 2 are not supported anymore.
    - Max mutation size is now configurable via max_mutation_size_in_kb setting in
      cassandra.yaml; the default is half the size commitlog_segment_size_in_mb * 1024.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/96eb58a0/test/unit/org/apache/cassandra/cql3/validation/operations/AggregationTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/validation/operations/AggregationTest.java b/test/unit/org/apache/cassandra/cql3/validation/operations/AggregationTest.java
index a1d0aab..7b3f12c 100644
--- a/test/unit/org/apache/cassandra/cql3/validation/operations/AggregationTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/operations/AggregationTest.java
@@ -91,6 +91,8 @@ public class AggregationTest extends CQLTester
         assertRows(execute("SELECT COUNT(*) FROM %s"), row(4L));
         assertRows(execute("SELECT COUNT(1) FROM %s"), row(4L));
         assertRows(execute("SELECT COUNT(b), count(c), count(e), count(f) FROM %s"), row(4L, 3L, 3L, 3L));
+        // Makes sure that LIMIT does not affect the result of aggregates
+        assertRows(execute("SELECT COUNT(b), count(c), count(e), count(f) FROM %s LIMIT 2"), row(4L, 3L, 3L, 3L));
     }
 
     @Test
@@ -130,6 +132,8 @@ public class AggregationTest extends CQLTester
         assertRows(execute("SELECT COUNT(1) FROM %s"), row(4L));
         assertRows(execute("SELECT max(b), b, COUNT(*) FROM %s"), row(5, 1, 4L));
         assertRows(execute("SELECT max(b), COUNT(1), b FROM %s"), row(5, 4L, 1));
+        // Makes sure that LIMIT does not affect the result of aggregates
+        assertRows(execute("SELECT max(b), COUNT(1), b FROM %s LIMIT 2"), row(5, 4L, 1));
     }
 
     @Test


[2/2] cassandra git commit: Merge branch cassandra-3.0 into trunk

Posted by bl...@apache.org.
Merge branch cassandra-3.0 into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/56d81ac5
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/56d81ac5
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/56d81ac5

Branch: refs/heads/trunk
Commit: 56d81ac53b25998d614537b25dd936af4721d250
Parents: b283eac 96eb58a
Author: blerer <be...@datastax.com>
Authored: Tue Sep 22 20:52:00 2015 +0200
Committer: blerer <be...@datastax.com>
Committed: Tue Sep 22 20:53:18 2015 +0200

----------------------------------------------------------------------
 NEWS.txt                                                         | 3 +++
 .../cassandra/cql3/validation/operations/AggregationTest.java    | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------