cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Ninja fix simple bugs from #6438
Date Fri, 10 Jan 2014 17:55:11 GMT
Updated Branches:
  refs/heads/trunk 379212d5d -> eca02fd25


Ninja fix simple bugs from #6438


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

Branch: refs/heads/trunk
Commit: eca02fd2551d36ccbcf7a2f5e7aeafed12b0a869
Parents: 379212d
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Fri Jan 10 18:54:54 2014 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Fri Jan 10 18:55:07 2014 +0100

----------------------------------------------------------------------
 .../org/apache/cassandra/cql3/statements/AlterTableStatement.java  | 2 +-
 src/java/org/apache/cassandra/db/CFRowAdder.java                   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eca02fd2/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java b/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
index 6f90a02..0932b5c 100644
--- a/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
@@ -71,7 +71,7 @@ public class AlterTableStatement extends SchemaAlteringStatement
         CFMetaData meta = validateColumnFamily(keyspace(), columnFamily());
         CFMetaData cfm = meta.clone();
 
-        CQL3Type validator = this.validator.prepare(keyspace());
+        CQL3Type validator = this.validator == null ? null : this.validator.prepare(keyspace());
 
         ColumnDefinition def = columnName == null ? null : cfm.getColumnDefinition(columnName);
         switch (oType)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/eca02fd2/src/java/org/apache/cassandra/db/CFRowAdder.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/CFRowAdder.java b/src/java/org/apache/cassandra/db/CFRowAdder.java
index ec22e9a..9fd5e9a 100644
--- a/src/java/org/apache/cassandra/db/CFRowAdder.java
+++ b/src/java/org/apache/cassandra/db/CFRowAdder.java
@@ -103,7 +103,7 @@ public class CFRowAdder
             AbstractType valueType = def.type.isCollection()
                                    ? ((CollectionType) def.type).valueComparator()
                                    : def.type;
-            cf.addColumn(new Cell(name, valueType.decompose(value), timestamp));
+            cf.addColumn(new Cell(name, value instanceof ByteBuffer ? (ByteBuffer)value :
valueType.decompose(value), timestamp));
         }
         return this;
     }


Mime
View raw message