cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [3/3] git commit: fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey Yeschenko, reviewed by jbellis for CASSANDRA-4965
Date Mon, 19 Nov 2012 10:11:36 GMT
fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey Yeschenko, reviewed
by jbellis for CASSANDRA-4965


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

Branch: refs/heads/cassandra-1.2
Commit: e30519f333b05dd70c881ff57bd4a5ddee24aaa0
Parents: dd1633b
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Mon Nov 19 11:57:11 2012 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Mon Nov 19 11:57:11 2012 +0300

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |    9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2ed9666..ef5e43b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice
    (CASSANDRA-4919)
  * expunge row cache post-truncate (CASSANDRA-4940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/src/java/org/apache/cassandra/cql/AlterTableStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql/AlterTableStatement.java b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
index 4267340..ac02198 100644
--- a/src/java/org/apache/cassandra/cql/AlterTableStatement.java
+++ b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
@@ -161,14 +161,15 @@ public class AlterTableStatement
 
     public static void applyPropertiesToCFMetadata(CFMetaData cfm, CFPropDefs cfProps) throws
InvalidRequestException, ConfigurationException
     {
+        if (cfProps.hasProperty(CFPropDefs.KW_COMPACTION_STRATEGY_CLASS))
+            cfm.compactionStrategyClass(cfProps.compactionStrategyClass);
+
         if (cfProps.hasProperty(CFPropDefs.KW_COMPARATOR))
-        {
             throw new InvalidRequestException("Can't change CF comparator after creation");
-        }
+
         if (cfProps.hasProperty(CFPropDefs.KW_COMMENT))
-        {
             cfm.comment(cfProps.getProperty(CFPropDefs.KW_COMMENT));
-        }
+
         if (cfProps.hasProperty(CFPropDefs.KW_DEFAULTVALIDATION))
         {
             try


Mime
View raw message