cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/3] git commit: Merge branch 'cassandra-2.0' into trunk
Date Mon, 17 Feb 2014 14:02:51 GMT
Merge branch 'cassandra-2.0' into trunk

Conflicts:
	src/java/org/apache/cassandra/cql3/CFDefinition.java
	src/java/org/apache/cassandra/cql3/ColumnNameBuilder.java
	src/java/org/apache/cassandra/cql3/Cql.g
	src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
	src/java/org/apache/cassandra/db/marshal/CompositeType.java


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

Branch: refs/heads/trunk
Commit: 4c727f6f97411d55e12d1b5615e5425d162b1ad8
Parents: 9ea9949 44cf4a6
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Feb 17 15:02:44 2014 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Feb 17 15:02:44 2014 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 +
 doc/cql3/CQL.textile                            | 24 +++++-
 src/java/org/apache/cassandra/cql3/Cql.g        | 16 ++++
 .../apache/cassandra/cql3/QueryProcessor.java   |  2 +-
 .../org/apache/cassandra/cql3/Relation.java     | 17 +++-
 .../cassandra/cql3/statements/Restriction.java  | 24 +++++-
 .../cql3/statements/SelectStatement.java        | 85 +++++++++++++++-----
 .../cassandra/db/marshal/CompositeType.java     | 61 +++++++-------
 .../apache/cassandra/net/MessagingService.java  | 26 +++++-
 9 files changed, 197 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c727f6f/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c727f6f/doc/cql3/CQL.textile
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c727f6f/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/Cql.g
index 11291b6,6e7cf1c..55d8aac
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@@ -964,8 -881,22 +964,24 @@@ relation[List<Relation> clauses
          { $clauses.add(new Relation(name, Relation.Type.IN, marker)); }
      | name=cident K_IN { Relation rel = Relation.createInRelation($name.id); }
         '(' ( f1=term { rel.addInValue(f1); } (',' fN=term { rel.addInValue(fN); } )* )?
')' { $clauses.add(rel); }
 +    | name=cident K_CONTAINS { Relation.Type rt = Relation.Type.CONTAINS; } (K_KEY { rt
= Relation.Type.CONTAINS_KEY; })?
 +        t=term { $clauses.add(new Relation(name, rt, t)); }
+     | {
+          List<ColumnIdentifier> ids = new ArrayList<ColumnIdentifier>();
+          List<Term.Raw> terms = new ArrayList<Term.Raw>();
+       }
+         '(' n1=cident { ids.add(n1); } (',' ni=cident { ids.add(ni); })* ')'
+         type=relationType
+         '(' t1=term { terms.add(t1); } (',' ti=term { terms.add(ti); })* ')'
+       {
+           if (type == Relation.Type.IN)
+               addRecognitionError("Cannot use IN relation with tuple notation");
+           if (ids.size() != terms.size())
+               addRecognitionError(String.format("Number of values (" + terms.size() + ")
in tuple notation doesn't match the number of column names (" + ids.size() + ")"));
+           else
+               for (int i = 0; i < ids.size(); i++)
+                   $clauses.add(new Relation(ids.get(i), type, terms.get(i), i == 0 ? null
: ids.get(i-1)));
+       }
      | '(' relation[$clauses] ')'
      ;
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c727f6f/src/java/org/apache/cassandra/cql3/QueryProcessor.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/QueryProcessor.java
index f2559e6,167533f..5acb367
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@@ -45,10 -44,10 +45,10 @@@ import org.apache.cassandra.utils.Seman
  
  public class QueryProcessor
  {
-     public static final SemanticVersion CQL_VERSION = new SemanticVersion("3.1.4");
+     public static final SemanticVersion CQL_VERSION = new SemanticVersion("3.1.5");
  
      private static final Logger logger = LoggerFactory.getLogger(QueryProcessor.class);
 -    private static final MemoryMeter meter = new MemoryMeter();
 +    private static final MemoryMeter meter = new MemoryMeter().withGuessing(MemoryMeter.Guess.FALLBACK_BEST);
      private static final long MAX_CACHE_PREPARED_MEMORY = Runtime.getRuntime().maxMemory()
/ 256;
      private static final int MAX_CACHE_PREPARED_COUNT = 10000;
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c727f6f/src/java/org/apache/cassandra/cql3/Relation.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/Relation.java
index cfcdd54,9d065bf..2eeef1d
--- a/src/java/org/apache/cassandra/cql3/Relation.java
+++ b/src/java/org/apache/cassandra/cql3/Relation.java
@@@ -33,25 -33,15 +33,28 @@@ public class Relatio
      private final List<Term.Raw> inValues;
      public final boolean onToken;
  
+     // Will be null unless for tuple notations (#4851)
+     public final ColumnIdentifier previousInTuple;
+ 
      public static enum Type
      {
 -        EQ, LT, LTE, GTE, GT, IN;
 +        EQ, LT, LTE, GTE, GT, IN, CONTAINS, CONTAINS_KEY;
 +
 +        public boolean allowsIndexQuery()
 +        {
 +            switch (this)
 +            {
 +                case EQ:
 +                case CONTAINS:
 +                case CONTAINS_KEY:
 +                    return true;
 +                default:
 +                    return false;
 +            }
 +        }
      }
  
-     private Relation(ColumnIdentifier entity, Type type, Term.Raw value, List<Term.Raw>
inValues, boolean onToken)
+     private Relation(ColumnIdentifier entity, Type type, Term.Raw value, List<Term.Raw>
inValues, boolean onToken, ColumnIdentifier previousInTuple)
      {
          this.entity = entity;
          this.relationType = type;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c727f6f/src/java/org/apache/cassandra/cql3/statements/Restriction.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/Restriction.java
index cadabf3,6323acb..6b7eca7
--- a/src/java/org/apache/cassandra/cql3/statements/Restriction.java
+++ b/src/java/org/apache/cassandra/cql3/statements/Restriction.java
@@@ -22,8 -22,10 +22,10 @@@ import java.util.ArrayList
  import java.util.Collections;
  import java.util.List;
  
+ import com.google.common.base.Objects;
+ 
  import org.apache.cassandra.exceptions.InvalidRequestException;
 -import org.apache.cassandra.thrift.IndexOperator;
 +import org.apache.cassandra.db.IndexExpression;
  import org.apache.cassandra.cql3.*;
  
  /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c727f6f/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 5622e40,52a7c70..6b61ea5
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -656,14 -669,16 +658,16 @@@ public class SelectStatement implement
          // to the component comparator but not to the end-of-component itself),
          // it only depends on whether the slice is reversed
          Bound eocBound = isReversed ? Bound.reverse(bound) : bound;
-         for (ColumnDefinition def : defs)
 -        for (Iterator<CFDefinition.Name> iter = names.iterator(); iter.hasNext();)
++        for (Iterator<ColumnDefinition> iter = defs.iterator(); iter.hasNext();)
          {
 -            CFDefinition.Name name = iter.next();
++            ColumnDefinition def = iter.next();
+ 
              // In a restriction, we always have Bound.START < Bound.END for the "base"
comparator.
              // So if we're doing a reverse slice, we must inverse the bounds when giving
them as start and end of the slice filter.
              // But if the actual comparator itself is reversed, we must inversed the bounds
too.
 -            Bound b = isReversed == isReversedType(name) ? bound : Bound.reverse(bound);
 -            Restriction r = restrictions[name.position];
 +            Bound b = isReversed == isReversedType(def) ? bound : Bound.reverse(bound);
 +            Restriction r = restrictions[def.position()];
-             if (r == null || (r.isSlice() && !((Restriction.Slice)r).hasBound(b)))
+             if (isNullRestriction(r, b))
              {
                  // There wasn't any non EQ relation on that key, we select all records having
the preceding component as prefix.
                  // For composites, if there was preceding component and we're computing
the end, we must change the last component
@@@ -674,12 -690,21 +678,21 @@@
  
              if (r.isSlice())
              {
-                 Restriction.Slice slice = (Restriction.Slice)r;
-                 assert slice.hasBound(b);
-                 ByteBuffer val = slice.bound(b, variables);
-                 if (val == null)
-                     throw new InvalidRequestException(String.format("Invalid null clustering
key part %s", def.name));
-                 return Collections.singletonList(builder.add(val).build().withEOC(eocForRelation(slice.getRelation(eocBound,
b))));
 -                builder.add(getSliceValue(name, r, b, variables));
++                builder.add(getSliceValue(def, r, b, variables));
+                 Relation.Type relType = ((Restriction.Slice)r).getRelation(eocBound, b);
+ 
+                 // We can have more non null restriction if the "scalar" notation was used
for the bound (#4851).
+                 // In that case, we need to add them all, and end the cell name with the
correct end-of-component.
+                 while (iter.hasNext())
+                 {
 -                    name = iter.next();
 -                    r = restrictions[name.position];
++                    def = iter.next();
++                    r = restrictions[def.position()];
+                     if (isNullRestriction(r, b))
+                         break;
+ 
 -                    builder.add(getSliceValue(name, r, b, variables));
++                    builder.add(getSliceValue(def, r, b, variables));
+                 }
 -                return Collections.singletonList(builder.buildForRelation(relType));
++                return Collections.singletonList(builder.build().withEOC(eocForRelation(relType)));
              }
              else
              {
@@@ -713,34 -738,29 +726,49 @@@
          // it would be harmless to do it. However, we use this method got the partition
key too. And when a query
          // with 2ndary index is done, and with the the partition provided with an EQ, we'll
end up here, and in that
          // case using the eoc would be bad, since for the random partitioner we have no
guarantee that
 -        // builder.buildAsEndOfRange() will sort after builder.build() (see #5240).
 -        return Collections.singletonList((bound == Bound.END && builder.remainingCount()
> 0) ? builder.buildAsEndOfRange() : builder.build());
 +        // prefix.end() will sort after prefix (see #5240).
 +        Composite prefix = builder.build();
 +        return Collections.singletonList(bound == Bound.END && builder.remainingCount()
> 0 ? prefix.end() : prefix);
 +    }
 +
 +    private static Composite.EOC eocForRelation(Relation.Type op)
 +    {
 +        switch (op)
 +        {
 +            case LT:
 +                // < X => using startOf(X) as finish bound
 +                return Composite.EOC.START;
 +            case GT:
 +            case LTE:
 +                // > X => using endOf(X) as start bound
 +                // <= X => using endOf(X) as finish bound
 +                return Composite.EOC.END;
 +            default:
 +                // >= X => using X as start bound (could use START_OF too)
 +                // = X => using X
 +                return Composite.EOC.NONE;
 +        }
      }
  
+     private static boolean isNullRestriction(Restriction r, Bound b)
+     {
+         return r == null || (r.isSlice() && !((Restriction.Slice)r).hasBound(b));
+     }
+ 
 -    private static ByteBuffer getSliceValue(CFDefinition.Name name, Restriction r, Bound
b, List<ByteBuffer> variables) throws InvalidRequestException
++    private static ByteBuffer getSliceValue(ColumnDefinition def, Restriction r, Bound b,
List<ByteBuffer> variables) throws InvalidRequestException
+     {
+         Restriction.Slice slice = (Restriction.Slice)r;
+         assert slice.hasBound(b);
+         ByteBuffer val = slice.bound(b, variables);
+         if (val == null)
 -            throw new InvalidRequestException(String.format("Invalid null clustering key
part %s", name));
++            throw new InvalidRequestException(String.format("Invalid null clustering key
part %s", def.name));
+         return val;
+     }
+ 
 -    private List<ByteBuffer> getRequestedBound(Bound b, List<ByteBuffer> variables)
throws InvalidRequestException
 +    private List<Composite> getRequestedBound(Bound b, List<ByteBuffer> variables)
throws InvalidRequestException
      {
          assert isColumnRange();
 -        return buildBound(b, cfDef.columns.values(), columnRestrictions, isReversed, cfDef.getColumnNameBuilder(),
variables);
 +        return buildBound(b, cfm.clusteringColumns(), columnRestrictions, isReversed, cfm.comparator,
variables);
      }
  
      public List<IndexExpression> getIndexExpressions(List<ByteBuffer> variables)
throws InvalidRequestException
@@@ -1091,23 -1163,23 +1119,23 @@@
                          hasQueriableClusteringColumnIndex = true;
                  }
  
 -                switch (name.kind)
 +                switch (def.kind)
                  {
 -                    case KEY_ALIAS:
 -                        stmt.keyRestrictions[name.position] = updateRestriction(cfm, name,
stmt.keyRestrictions[name.position], rel, names);
 +                    case PARTITION_KEY:
-                         stmt.keyRestrictions[def.position()] = updateRestriction(def, stmt.keyRestrictions[def.position()],
rel, names);
++                        stmt.keyRestrictions[def.position()] = updateRestriction(cfm, def,
stmt.keyRestrictions[def.position()], rel, names);
                          break;
 -                    case COLUMN_ALIAS:
 -                        stmt.columnRestrictions[name.position] = updateRestriction(cfm,
name, stmt.columnRestrictions[name.position], rel, names);
 +                    case CLUSTERING_COLUMN:
-                         stmt.columnRestrictions[def.position()] = updateRestriction(def,
stmt.columnRestrictions[def.position()], rel, names);
++                        stmt.columnRestrictions[def.position()] = updateRestriction(cfm,
def, stmt.columnRestrictions[def.position()], rel, names);
                          break;
 -                    case VALUE_ALIAS:
 -                        throw new InvalidRequestException(String.format("Predicates on the
non-primary-key column (%s) of a COMPACT table are not yet supported", name.name));
 -                    case COLUMN_METADATA:
 +                    case COMPACT_VALUE:
 +                        throw new InvalidRequestException(String.format("Predicates on the
non-primary-key column (%s) of a COMPACT table are not yet supported", def.name));
 +                    case REGULAR:
                          // We only all IN on the row key and last clustering key so far,
never on non-PK columns, and this even if there's an index
-                         Restriction r = updateRestriction(def, stmt.metadataRestrictions.get(def.name),
rel, names);
 -                        Restriction r = updateRestriction(cfm, name, stmt.metadataRestrictions.get(name),
rel, names);
++                        Restriction r = updateRestriction(cfm, def, stmt.metadataRestrictions.get(def.name),
rel, names);
                          if (r.isIN() && !((Restriction.IN)r).canHaveOnlyOneValue())
                              // Note: for backward compatibility reason, we conside a IN
of 1 value the same as a EQ, so we let that slide.
 -                            throw new InvalidRequestException(String.format("IN predicates
on non-primary-key columns (%s) is not yet supported", name));
 -                        stmt.metadataRestrictions.put(name, r);
 +                            throw new InvalidRequestException(String.format("IN predicates
on non-primary-key columns (%s) is not yet supported", def.name));
 +                        stmt.metadataRestrictions.put(def.name, r);
                          break;
                  }
              }
@@@ -1184,9 -1256,11 +1212,11 @@@
                  {
                      // Non EQ relation is not supported without token(), even if we have
a 2ndary index (since even those are ordered by partitioner).
                      // Note: In theory we could allow it for 2ndary index queries with ALLOW
FILTERING, but that would probably require some special casing
+                     // Note bis: This is also why we don't bother handling the 'tuple' notation
of #4851 for keys. If we lift the limitation for 2ndary
+                     // index with filtering, we'll need to handle it though.
                      throw new InvalidRequestException("Only EQ and IN relation are supported
on the partition key (unless you use the token() function)");
                  }
 -                previous = cname;
 +                previous = cdef;
              }
  
              // All (or none) of the partition key columns have been specified;
@@@ -1199,10 -1273,11 +1229,11 @@@
              // the column is indexed that is.
              canRestrictFurtherComponents = true;
              previous = null;
+             boolean previousIsSlice = false;
 -            iter = cfDef.columns.values().iterator();
 +            iter = cfm.clusteringColumns().iterator();
              for (int i = 0; i < stmt.columnRestrictions.length; i++)
              {
 -                CFDefinition.Name cname = iter.next();
 +                ColumnDefinition cdef = iter.next();
                  Restriction restriction = stmt.columnRestrictions[i];
  
                  if (restriction == null)
@@@ -1211,12 -1287,22 +1243,22 @@@
                  }
                  else if (!canRestrictFurtherComponents)
                  {
-                     if (hasQueriableIndex)
+                     // We're here if the previous clustering column was either not restricted
or was a slice.
+                     // We can't restrict the current column unless:
+                     //   1) we're in the special case of the 'tuple' notation from #4851
which we expand as multiple
+                     //      consecutive slices: in which case we're good with this restriction
and we continue
+                     //   2) we have a 2ndary index, in which case we have to use it but
can skip more validation
+                     boolean hasTuple = false;
+                     boolean hasRestrictedNotTuple = false;
+                     if (!(previousIsSlice && restriction.isSlice() && ((Restriction.Slice)restriction).isPartOfTuple()))
                      {
-                         stmt.usesSecondaryIndexing = true; // handle gaps and non-keyrange
cases.
-                         break;
+                         if (hasQueriableIndex)
+                         {
+                             stmt.usesSecondaryIndexing = true; // handle gaps and non-keyrange
cases.
+                             break;
+                         }
 -                        throw new InvalidRequestException(String.format("PRIMARY KEY part
%s cannot be restricted (preceding part %s is either not restricted or by a non-EQ relation)",
cname, previous));
++                        throw new InvalidRequestException(String.format("PRIMARY KEY part
%s cannot be restricted (preceding part %s is either not restricted or by a non-EQ relation)",
cdef.name, previous));
                      }
-                     throw new InvalidRequestException(String.format("PRIMARY KEY part %s
cannot be restricted (preceding part %s is either not restricted or by a non-EQ relation)",
cdef.name, previous));
                  }
                  else if (restriction.isSlice())
                  {
@@@ -1404,20 -1488,24 +1447,24 @@@
              return new ColumnSpecification(keyspace(), columnFamily(), new ColumnIdentifier("[limit]",
true), Int32Type.instance);
          }
  
-         Restriction updateRestriction(ColumnDefinition def, Restriction restriction, Relation
newRel, VariableSpecifications boundNames) throws InvalidRequestException
 -        Restriction updateRestriction(CFMetaData cfm, CFDefinition.Name name, Restriction
restriction, Relation newRel, VariableSpecifications boundNames) throws InvalidRequestException
++        Restriction updateRestriction(CFMetaData cfm, ColumnDefinition def, Restriction
restriction, Relation newRel, VariableSpecifications boundNames) throws InvalidRequestException
          {
 -            ColumnSpecification receiver = name;
 +            ColumnSpecification receiver = def;
              if (newRel.onToken)
              {
 -                if (name.kind != CFDefinition.Name.Kind.KEY_ALIAS)
 -                    throw new InvalidRequestException(String.format("The token() function
is only supported on the partition key, found on %s", name));
 +                if (def.kind != ColumnDefinition.Kind.PARTITION_KEY)
 +                    throw new InvalidRequestException(String.format("The token() function
is only supported on the partition key, found on %s", def.name));
  
 -                receiver = new ColumnSpecification(name.ksName,
 -                                                   name.cfName,
 +                receiver = new ColumnSpecification(def.ksName,
 +                                                   def.cfName,
                                                     new ColumnIdentifier("partition key token",
true),
                                                     StorageService.getPartitioner().getTokenValidator());
              }
  
+             // We can only use the tuple notation of #4851 on clustering columns for now
 -            if (newRel.previousInTuple != null && name.kind != CFDefinition.Name.Kind.COLUMN_ALIAS)
 -                throw new InvalidRequestException(String.format("Tuple notation can only
be used on clustering columns but found on %s", name));
++            if (newRel.previousInTuple != null && def.kind != ColumnDefinition.Kind.CLUSTERING_COLUMN)
++                throw new InvalidRequestException(String.format("Tuple notation can only
be used on clustering columns but found on %s", def.name));
+ 
              switch (newRel.operator())
              {
                  case EQ:
@@@ -1461,30 -1549,14 +1508,32 @@@
                          if (restriction == null)
                              restriction = new Restriction.Slice(newRel.onToken);
                          else if (!restriction.isSlice())
 -                            throw new InvalidRequestException(String.format("%s cannot be
restricted by both an equal and an inequal relation", name));
 -                        Term t = newRel.getValue().prepare(receiver);
 +                            throw new InvalidRequestException(String.format("%s cannot be
restricted by both an equal and an inequal relation", def.name));
 +                        Term t = newRel.getValue().prepare(keyspace(), receiver);
                          t.collectMarkerSpecification(boundNames);
-                         ((Restriction.Slice)restriction).setBound(def.name, newRel.operator(),
t);
 -                        if (newRel.previousInTuple != null && (name.position ==
0 || !cfm.clusteringKeyColumns().get(name.position - 1).name.equals(newRel.previousInTuple.key)))
 -                            throw new InvalidRequestException(String.format("Invalid tuple
notation, column %s is not before column %s in the clustering order", newRel.previousInTuple,
name.name));
 -                        ((Restriction.Slice)restriction).setBound(name.name, newRel.operator(),
t, newRel.previousInTuple);
++                        if (newRel.previousInTuple != null && (def.position() ==
0 || !cfm.clusteringColumns().get(def.position() - 1).name.equals(newRel.previousInTuple)))
++                            throw new InvalidRequestException(String.format("Invalid tuple
notation, column %s is not before column %s in the clustering order", newRel.previousInTuple,
def.name));
++                        ((Restriction.Slice)restriction).setBound(def.name, newRel.operator(),
t, newRel.previousInTuple);
                      }
                      break;
 +                case CONTAINS_KEY:
 +                    if (!(receiver.type instanceof MapType))
 +                        throw new InvalidRequestException(String.format("Cannot use CONTAINS_KEY
on non-map column %s", def.name));
 +                    // Fallthrough on purpose
 +                case CONTAINS:
 +                    {
 +                        if (!receiver.type.isCollection())
 +                            throw new InvalidRequestException(String.format("Cannot use
%s relation on non collection column %s", newRel.operator(), def.name));
 +
 +                        if (restriction == null)
 +                            restriction = new Restriction.Contains();
 +                        else if (!restriction.isContains())
 +                            throw new InvalidRequestException(String.format("Collection
column %s can only be restricted by CONTAINS or CONTAINS KEY", def.name));
 +                        boolean isKey = newRel.operator() == Relation.Type.CONTAINS_KEY;
 +                        receiver = makeCollectionReceiver(receiver, isKey);
 +                        Term t = newRel.getValue().prepare(keyspace(), receiver);
 +                        ((Restriction.Contains)restriction).add(t, isKey);
 +                    }
              }
              return restriction;
          }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c727f6f/src/java/org/apache/cassandra/db/marshal/CompositeType.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/marshal/CompositeType.java
index 19876dd,2c0e121..cb2697e
--- a/src/java/org/apache/cassandra/db/marshal/CompositeType.java
+++ b/src/java/org/apache/cassandra/db/marshal/CompositeType.java
@@@ -362,16 -347,6 +338,11 @@@ public class CompositeType extends Abst
              return this;
          }
  
-         public Builder add(ByteBuffer bb)
-         {
-             return add(bb, Relation.Type.EQ);
-         }
- 
 +        public Builder add(ColumnIdentifier name)
 +        {
 +            return add(name.bytes);
 +        }
 +
          public int componentCount()
          {
              return components.size();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c727f6f/src/java/org/apache/cassandra/net/MessagingService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/net/MessagingService.java
index 9713576,ad86bbd..22bdbe8
--- a/src/java/org/apache/cassandra/net/MessagingService.java
+++ b/src/java/org/apache/cassandra/net/MessagingService.java
@@@ -71,9 -71,10 +71,11 @@@ public final class MessagingService imp
      // 8 bits version, so don't waste versions
      public static final int VERSION_12  = 6;
      public static final int VERSION_20  = 7;
 -    public static final int current_version = VERSION_20;
 +    public static final int VERSION_21  = 8;
 +    public static final int current_version = VERSION_21;
  
+     public boolean allNodesAtLeast20 = true;
+ 
      /**
       * we preface every message with this number so the recipient can validate the sender
is sane
       */


Mime
View raw message