Fix Assertion errors when using empty clustering with static columns

patch by slebresne; reviewed by iamaleksey for CASSANDRA-7455
This commit is contained in:
Sylvain Lebresne 2014-06-30 15:56:56 +02:00
parent fc9eeb99f9
commit a9c71e4a20
2 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,8 @@
* Properly handle unrecognized opcodes and flags (CASSANDRA-7440)
* (Hadoop) close CqlRecordWriter clients when finished (CASSANDRA-7459)
* Make sure high level sstables get compacted (CASSANDRA-7414)
* Fix AssertionError when using empty clustering columns and static columns
(CASSANDRA-7455)
2.0.9

View File

@ -136,13 +136,13 @@ public class ColumnGroupMap
if (currentGroup == null)
{
currentGroup = new ColumnGroupMap(current, composite.isStaticName(c.name()));
currentGroup = new ColumnGroupMap(current, CompositeType.isStaticName(c.name()));
currentGroup.add(current, idx, c);
previous = current;
return;
}
if (!isSameGroup(current))
if ((currentGroup.isStatic && !CompositeType.isStaticName(c.name())) || !isSameGroup(current))
{
groups.add(currentGroup);
// Note that we know that only the first group built can be static