mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.1' into trunk
This commit is contained in:
commit
732986bbd0
|
|
@ -1,4 +1,5 @@
|
|||
3.0
|
||||
* Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
|
||||
* Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
|
||||
* Support direct buffer decompression for reads (CASSANDRA-8464)
|
||||
* DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
|
||||
|
|
@ -14,7 +15,7 @@
|
|||
* Support for user-defined aggregation functions (CASSANDRA-8053)
|
||||
* Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419)
|
||||
* Refactor SelectStatement, return IN results in natural order instead
|
||||
of IN value list order (CASSANDRA-7981)
|
||||
of IN value list order and ignore duplicate values in partition key IN restrictions (CASSANDRA-7981)
|
||||
* Support UDTs, tuples, and collections in user-defined
|
||||
functions (CASSANDRA-7563)
|
||||
* Fix aggregate fn results on empty selection, result column name,
|
||||
|
|
|
|||
|
|
@ -660,4 +660,19 @@ public class MultiColumnRelationTest extends CQLTester
|
|||
assertInvalidMessage("Partition key parts: b must be restricted as other parts are",
|
||||
"SELECT * FROM %s WHERE a = ? AND (c, d) >= (?, ?) ALLOW FILTERING", 0, 1, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testINWithDuplicateValue() throws Throwable
|
||||
{
|
||||
for (String compactOption : new String[] { "", " WITH COMPACT STORAGE" })
|
||||
{
|
||||
createTable("CREATE TABLE %s (k1 int, k2 int, v int, PRIMARY KEY (k1, k2))" + compactOption);
|
||||
execute("INSERT INTO %s (k1, k2, v) VALUES (?, ?, ?)", 1, 1, 1);
|
||||
|
||||
assertRows(execute("SELECT * FROM %s WHERE k1 IN (?, ?) AND (k2) IN ((?), (?))", 1, 1, 1, 2),
|
||||
row(1, 1, 1));
|
||||
assertRows(execute("SELECT * FROM %s WHERE k1 = ? AND (k2) IN ((?), (?))", 1, 1, 1),
|
||||
row(1, 1, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -383,6 +383,25 @@ public class SingleColumnRelationTest extends CQLTester
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testINWithDuplicateValue() throws Throwable
|
||||
{
|
||||
for (String compactOption : new String[] { "", " WITH COMPACT STORAGE" })
|
||||
{
|
||||
createTable("CREATE TABLE %s (k1 int, k2 int, v int, PRIMARY KEY (k1, k2))" + compactOption);
|
||||
execute("INSERT INTO %s (k1, k2, v) VALUES (?, ?, ?)", 1, 1, 1);
|
||||
|
||||
assertRows(execute("SELECT * FROM %s WHERE k1 IN (?, ?)", 1, 1),
|
||||
row(1, 1, 1));
|
||||
|
||||
assertRows(execute("SELECT * FROM %s WHERE k1 IN (?, ?) AND k2 IN (?, ?)", 1, 1, 1, 1),
|
||||
row(1, 1, 1));
|
||||
|
||||
assertRows(execute("SELECT * FROM %s WHERE k1 = ? AND k2 IN (?, ?)", 1, 1, 1),
|
||||
row(1, 1, 1));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLargeClusteringINValues() throws Throwable
|
||||
{
|
||||
|
|
@ -392,7 +411,6 @@ public class SingleColumnRelationTest extends CQLTester
|
|||
for (int i = 0; i < 10000; i++)
|
||||
inValues.add(i);
|
||||
assertRows(execute("SELECT * FROM %s WHERE k=? AND c IN ?", 0, inValues),
|
||||
row(0, 0, 0)
|
||||
);
|
||||
row(0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue