cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/2] git commit: Add back ColumnIdentifier comparison since we do use it
Date Fri, 25 Apr 2014 13:41:15 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 082bfc9ee -> 98dcde103


Add back ColumnIdentifier comparison since we do use it


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/08a9d384
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/08a9d384
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/08a9d384

Branch: refs/heads/cassandra-2.0
Commit: 08a9d384d87d472d7f8383fa1d9b457190309b27
Parents: c0c2de5
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Fri Apr 25 15:37:50 2014 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Fri Apr 25 15:37:50 2014 +0200

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cql3/CFDefinition.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/08a9d384/src/java/org/apache/cassandra/cql3/CFDefinition.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/CFDefinition.java b/src/java/org/apache/cassandra/cql3/CFDefinition.java
index 6565a85..47de4dd 100644
--- a/src/java/org/apache/cassandra/cql3/CFDefinition.java
+++ b/src/java/org/apache/cassandra/cql3/CFDefinition.java
@@ -49,7 +49,13 @@ public class CFDefinition implements Iterable<CFDefinition.Name>
     public final LinkedHashMap<ColumnIdentifier, Name> columns = new LinkedHashMap<ColumnIdentifier,
Name>();
     public final Name value;
     // Keep metadata lexicographically ordered so that wildcard expansion have a deterministic
order
-    public final Map<ColumnIdentifier, Name> metadata = new TreeMap<ColumnIdentifier,
Name>();
+    public final Map<ColumnIdentifier, Name> metadata = new TreeMap<ColumnIdentifier,
Name>(new Comparator<ColumnIdentifier>()
+    {
+        public int compare(ColumnIdentifier id1, ColumnIdentifier id2)
+        {
+            return ByteBufferUtil.compareUnsigned(id1.key, id2.key);
+        }
+    });;
 
     public final boolean isComposite;
     public final boolean hasCompositeKey;


Mime
View raw message