cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [4/6] git commit: Fix allowing collections with compact storage
Date Mon, 26 Nov 2012 18:23:22 GMT
Fix allowing collections with compact storage

patch by slebresne; reviewed by yukim for CASSANDRA-4990


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

Branch: refs/heads/trunk
Commit: f5a4a1dfc5f708141209a4e15d51f82da3217a42
Parents: 715c836
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Nov 26 19:20:12 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Nov 26 19:20:12 2012 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../statements/CreateColumnFamilyStatement.java    |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a4a1df/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5ce19d0..f4e2395 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,6 +23,7 @@
  * Remove cassandra specific exceptions from JMX interface (CASSANDRA-4893)
  * (CQL3) Force using ALLOW FILTERING on potentially inefficient queries (CASSANDRA-4915)
  * Fix adding column when the table has collections (CASSANDRA-4982)
+ * Fix allowing collections with compact storage (CASSANDRA-4990)
 Merged from 1.1:
  * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a4a1df/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
b/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
index 1f8ee7e..3e40cd6 100644
--- a/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
@@ -209,6 +209,9 @@ public class CreateColumnFamilyStatement extends SchemaAlteringStatement
                     if (stmt.columns.isEmpty())
                         throw new InvalidRequestException("No definition found that is not
part of the PRIMARY KEY");
 
+                    if (definedCollections != null)
+                        throw new InvalidRequestException("Collection types are not supported
with COMPACT STORAGE");
+
                     stmt.comparator = CFDefinition.definitionType;
                 }
                 else


Mime
View raw message