cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Fix 6956 patch
Date Tue, 01 Apr 2014 09:29:04 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 abc6565e2 -> d8c29a3f7


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/cassandra-2.0
Commit: d8c29a3f7e482c99a075f581902c0ed7d142cd6e
Parents: abc6565
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Apr 1 11:28:48 2014 +0200
Committer: Sylvain Lebresne <sylvain@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;
                 }


Mime
View raw message