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

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10380
This commit is contained in:
blerer 2015-09-22 20:44:49 +02:00
parent c95a7098cf
commit 96eb58a0fb
2 changed files with 7 additions and 0 deletions

View File

@ -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.

View File

@ -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