You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2014/04/01 11:30:16 UTC
[3/5] git commit: Fix 6956 patch
Fix 6956 patch
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d8c29a3f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d8c29a3f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d8c29a3f
Branch: refs/heads/trunk
Commit: d8c29a3f7e482c99a075f581902c0ed7d142cd6e
Parents: abc6565
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Tue Apr 1 11:28:48 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Tue Apr 1 11:28:48 2014 +0200
----------------------------------------------------------------------
.../org/apache/cassandra/db/filter/ColumnCounter.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8c29a3f/src/java/org/apache/cassandra/db/filter/ColumnCounter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/filter/ColumnCounter.java b/src/java/org/apache/cassandra/db/filter/ColumnCounter.java
index 83b138c..814d8ed 100644
--- a/src/java/org/apache/cassandra/db/filter/ColumnCounter.java
+++ b/src/java/org/apache/cassandra/db/filter/ColumnCounter.java
@@ -123,13 +123,16 @@ public class ColumnCounter
}
else
{
- boolean isSameGroup = true;
- for (int i = 0; i < toGroup; i++)
+ boolean isSameGroup = previousGroupIsStatic == type.isStaticName(column.name());
+ if (isSameGroup)
{
- if (ByteBufferUtil.compareUnsigned(previous[i], current[i]) != 0)
+ for (int i = 0; i < toGroup; i++)
{
- isSameGroup = false;
- break;
+ if (ByteBufferUtil.compareUnsigned(previous[i], current[i]) != 0)
+ {
+ isSameGroup = false;
+ break;
+ }
}
}
@@ -141,6 +144,7 @@ public class ColumnCounter
// just don't count the 2nd group if there is one and the first one was static
if (previousGroupIsStatic)
{
+ previous = current;
previousGroupIsStatic = false;
return;
}