Updated Branches: refs/heads/trunk de0743fd0 -> d66630d3f
Merge branch 'cassandra-1.2' into trunk Conflicts: src/java/org/apache/cassandra/db/marshal/CollectionType.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d66630d3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d66630d3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d66630d3 Branch: refs/heads/trunk Commit: d66630d3f17659aa8134689280b61aa2c76817a9 Parents: de0743f a67f779 Author: Sylvain Lebresne <sylv...@datastax.com> Authored: Thu Jan 31 12:21:29 2013 +0100 Committer: Sylvain Lebresne <sylv...@datastax.com> Committed: Thu Jan 31 12:21:29 2013 +0100 ---------------------------------------------------------------------- NEWS.txt | 11 + doc/cql3/CQL.textile | 98 ++++++-- src/java/org/apache/cassandra/cql3/CQL3Type.java | 185 +++++++++++++++ src/java/org/apache/cassandra/cql3/Cql.g | 82 ++++--- src/java/org/apache/cassandra/cql3/ParsedType.java | 152 ------------ src/java/org/apache/cassandra/cql3/Term.java | 55 ++++- .../cassandra/cql3/operations/ColumnOperation.java | 7 +- .../cassandra/cql3/operations/ListOperation.java | 15 +- .../cassandra/cql3/operations/MapOperation.java | 9 +- .../cassandra/cql3/operations/Operation.java | 2 +- .../cql3/operations/PreparedOperation.java | 46 +++- .../cassandra/cql3/operations/SetOperation.java | 49 +++-- .../cql3/statements/AlterTableStatement.java | 4 +- .../statements/CreateColumnFamilyStatement.java | 8 +- .../cassandra/cql3/statements/DeleteStatement.java | 6 +- .../cassandra/cql3/statements/SelectStatement.java | 15 +- .../cassandra/cql3/statements/UpdateStatement.java | 27 +-- src/java/org/apache/cassandra/db/SystemTable.java | 6 +- .../apache/cassandra/db/marshal/AbstractType.java | 15 ++ .../org/apache/cassandra/db/marshal/AsciiType.java | 16 ++ .../apache/cassandra/db/marshal/BooleanType.java | 16 ++ .../org/apache/cassandra/db/marshal/BytesType.java | 16 ++ .../cassandra/db/marshal/CollectionType.java | 7 + .../cassandra/db/marshal/CounterColumnType.java | 16 ++ .../org/apache/cassandra/db/marshal/DateType.java | 17 ++- .../apache/cassandra/db/marshal/DecimalType.java | 16 ++ .../apache/cassandra/db/marshal/DoubleType.java | 16 ++ .../org/apache/cassandra/db/marshal/FloatType.java | 16 ++ .../cassandra/db/marshal/InetAddressType.java | 16 ++ .../org/apache/cassandra/db/marshal/Int32Type.java | 15 ++ .../apache/cassandra/db/marshal/IntegerType.java | 16 ++ .../cassandra/db/marshal/LexicalUUIDType.java | 10 + .../org/apache/cassandra/db/marshal/LongType.java | 16 ++ .../apache/cassandra/db/marshal/TimeUUIDType.java | 16 ++ .../org/apache/cassandra/db/marshal/UTF8Type.java | 16 ++ .../org/apache/cassandra/db/marshal/UUIDType.java | 16 ++ .../dht/AbstractByteOrderedPartitioner.java | 7 + .../org/apache/cassandra/dht/IPartitioner.java | 3 + .../org/apache/cassandra/dht/LocalPartitioner.java | 5 + .../apache/cassandra/dht/Murmur3Partitioner.java | 7 + .../cassandra/dht/OrderPreservingPartitioner.java | 7 + .../apache/cassandra/dht/RandomPartitioner.java | 7 + .../apache/cassandra/service/StorageService.java | 13 +- 43 files changed, 799 insertions(+), 299 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/operations/ColumnOperation.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cql3/operations/ColumnOperation.java index c5f5b44,d53a6b0..47abc76 --- a/src/java/org/apache/cassandra/cql3/operations/ColumnOperation.java +++ b/src/java/org/apache/cassandra/cql3/operations/ColumnOperation.java @@@ -108,13 -109,17 +108,17 @@@ public class ColumnOperation implement val = -val; } - cf.addCounter(new QueryPath(cf.metadata().cfName, null, builder.build()), val); + cf.addCounter(builder.build(), val); } - public void addBoundNames(ColumnSpecification column, ColumnSpecification[] boundNames) throws InvalidRequestException + public Operation validateAndAddBoundNames(ColumnSpecification column, ColumnSpecification[] boundNames) throws InvalidRequestException { + value.validateType(column.name.toString(), column.type); + if (value.isBindMarker()) boundNames[value.bindIndex] = column; + + return this; } public List<Term> getValues() http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/operations/ListOperation.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/operations/MapOperation.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/operations/Operation.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cql3/operations/Operation.java index 052c3be,98ec503..1d180ba --- a/src/java/org/apache/cassandra/cql3/operations/Operation.java +++ b/src/java/org/apache/cassandra/cql3/operations/Operation.java @@@ -39,9 -39,9 +39,9 @@@ public interface Operatio ColumnNameBuilder builder, AbstractType<?> validator, UpdateParameters params, - List<Pair<ByteBuffer, IColumn>> list) throws InvalidRequestException; + List<Pair<ByteBuffer, Column>> list) throws InvalidRequestException; - public void addBoundNames(ColumnSpecification column, ColumnSpecification[] boundNames) throws InvalidRequestException; + public Operation validateAndAddBoundNames(ColumnSpecification column, ColumnSpecification[] boundNames) throws InvalidRequestException; public List<Term> getValues(); http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/operations/PreparedOperation.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cql3/operations/PreparedOperation.java index 0e7cb1b,77cd183..cf24321 --- a/src/java/org/apache/cassandra/cql3/operations/PreparedOperation.java +++ b/src/java/org/apache/cassandra/cql3/operations/PreparedOperation.java @@@ -23,9 -23,10 +23,10 @@@ import java.util.List import org.apache.cassandra.cql3.*; import org.apache.cassandra.db.ColumnFamily; -import org.apache.cassandra.db.IColumn; +import org.apache.cassandra.db.Column; import org.apache.cassandra.db.marshal.AbstractType; import org.apache.cassandra.db.marshal.CollectionType; + import org.apache.cassandra.db.marshal.CounterColumnType; import org.apache.cassandra.db.marshal.ListType; import org.apache.cassandra.db.marshal.MapType; import org.apache.cassandra.db.marshal.SetType; http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/operations/SetOperation.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/db/SystemTable.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/db/marshal/AbstractType.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/db/marshal/AbstractType.java index 3494002,5c4c03e..7a7c136 --- a/src/java/org/apache/cassandra/db/marshal/AbstractType.java +++ b/src/java/org/apache/cassandra/db/marshal/AbstractType.java @@@ -21,9 -21,12 +21,12 @@@ import java.nio.ByteBuffer import java.util.Collection; import java.util.Comparator; import java.util.Map; + import java.util.Set; + import org.apache.cassandra.cql3.CQL3Type; + import org.apache.cassandra.cql3.Term; import org.apache.cassandra.exceptions.SyntaxException; -import org.apache.cassandra.db.IColumn; +import org.apache.cassandra.db.Column; import org.apache.cassandra.db.OnDiskAtom; import org.apache.cassandra.db.RangeTombstone; import static org.apache.cassandra.io.sstable.IndexHelper.IndexInfo; http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/db/marshal/CollectionType.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/db/marshal/CollectionType.java index 621e5c3,b448f1b..458cf34 --- a/src/java/org/apache/cassandra/db/marshal/CollectionType.java +++ b/src/java/org/apache/cassandra/db/marshal/CollectionType.java @@@ -20,7 -20,8 +20,8 @@@ package org.apache.cassandra.db.marshal import java.nio.ByteBuffer; import java.util.List; + import org.apache.cassandra.cql3.CQL3Type; -import org.apache.cassandra.db.IColumn; +import org.apache.cassandra.db.Column; import org.apache.cassandra.utils.ByteBufferUtil; import org.apache.cassandra.utils.Pair; http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/dht/AbstractByteOrderedPartitioner.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66630d3/src/java/org/apache/cassandra/service/StorageService.java ----------------------------------------------------------------------