cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/2] git commit: Allow static CF definition with COMPACT STORAGE
Date Tue, 06 Nov 2012 10:23:05 GMT
Allow static CF definition with COMPACT STORAGE

patch by slebresne; reviewed by jbellis for CASSANDRA-4910


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

Branch: refs/heads/trunk
Commit: 77ee3109e547013c08007e546921ac50137923d9
Parents: 988c10f
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Nov 6 11:14:46 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Nov 6 11:14:46 2012 +0100

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/77ee3109/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5f5ea89..c033172 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,7 @@
  * (CQL) fix CREATE COLUMNFAMILY permissions check (CASSANDRA-4864)
  * Fix DynamicCompositeType same type comparison (CASSANDRA-4711)
  * Fix duplicate SSTable reference when stream session failed (CASSANDRA-3306)
+ * Allow static CF definition with compact storage (CASSANDRA-4910)
 
 
 1.1.6

http://git-wip-us.apache.org/repos/asf/cassandra/blob/77ee3109/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 286f265..3d77053 100644
--- a/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
@@ -222,11 +222,8 @@ public class CreateColumnFamilyStatement extends SchemaAlteringStatement
                     stmt.comparator = CFDefinition.definitionType;
                 }
 
-                if (useCompactStorage)
+                if (useCompactStorage && !stmt.columnAliases.isEmpty())
                 {
-                    // There should at least have been one column alias
-                    if (stmt.columnAliases.isEmpty())
-                        throw new InvalidRequestException("COMPACT STORAGE requires at least
one column part of the clustering key, none found");
                     // There should be only one column definition remaining, which gives
us the default validator.
                     if (stmt.columns.isEmpty())
                         throw new InvalidRequestException("COMPACT STORAGE requires one definition
not part of the PRIMARY KEY, none found");


Mime
View raw message