cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/3] cassandra git commit: Expose the column family in DropIndexStatement
Date Fri, 20 Mar 2015 09:38:02 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 850b5d0d2 -> 61c8ff4db


Expose the column family in DropIndexStatement

patch by Ulises Cervino Beresi; reviewed by Sam Tunnicliffe for
CASSANDRA-8991


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

Branch: refs/heads/trunk
Commit: 5fd4a01165586f1c4e273e08595238bd1bc2d5ea
Parents: b2aa67e
Author: Ulises Cervino Beresi <ulises.cervino@datastax.com>
Authored: Fri Mar 13 09:45:23 2015 +0000
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Fri Mar 20 12:34:00 2015 +0300

----------------------------------------------------------------------
 .../cassandra/cql3/statements/DropIndexStatement.java     | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5fd4a011/src/java/org/apache/cassandra/cql3/statements/DropIndexStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/DropIndexStatement.java b/src/java/org/apache/cassandra/cql3/statements/DropIndexStatement.java
index ac5262e..b2e8dde 100644
--- a/src/java/org/apache/cassandra/cql3/statements/DropIndexStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/DropIndexStatement.java
@@ -40,6 +40,16 @@ public class DropIndexStatement extends SchemaAlteringStatement
         this.ifExists = ifExists;
     }
 
+    // We don't override CFStatement#columnFamily as this'd change the
+    // protocol for returned events when we drop an index. We need it
+    // to return null so that SchemaMigrations remain a keyspace,
+    // rather than table, level event (see SchemaAlteringStatement#execute).
+    public String getColumnFamily() throws InvalidRequestException
+    {
+        CFMetaData cfm = findIndexedCF();
+        return cfm == null ? null : cfm.cfName;
+    }
+
     public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
     {
         CFMetaData cfm = findIndexedCF();


Mime
View raw message