You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2013/06/05 16:26:28 UTC

git commit: Allow creating CUSTOM indexes on collections

Updated Branches:
  refs/heads/cassandra-1.2 1f4869530 -> ca3c75ecb


Allow creating CUSTOM indexes on collections

patch by Ben Coverston; reviewed by Aleksey Yeschenko for
CASSANDRA-5615


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

Branch: refs/heads/cassandra-1.2
Commit: ca3c75ecb22fa13e2f58129df83073800ff451ef
Parents: 1f48695
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Wed Jun 5 17:22:04 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Wed Jun 5 17:22:04 2013 +0300

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../cql3/statements/CreateIndexStatement.java      |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca3c75ec/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 09e9119..b569b4a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -17,6 +17,7 @@
  * fix SnitchProperties logging context (CASSANDRA-5602)
  * Expose whether jna is enabled and memory is locked via JMX (CASSANDRA-5508)
  * cqlsh: fix COPY FROM with ReversedType (CASSANDRA-5610)
+ * Allow creating CUSTOM indexes on collections (CASSANDRA-5615)
 Merged from 1.1:
  * Remove buggy thrift max message length option (CASSANDRA-5529)
  * Fix NPE in Pig's widerow mode (CASSANDRA-5488)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca3c75ec/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java b/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
index b371c11..549fab8 100644
--- a/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
@@ -85,7 +85,7 @@ public class CreateIndexStatement extends SchemaAlteringStatement
                 if (cd.getIndexType() != null)
                     throw new InvalidRequestException("Index already exists");
 
-                if (cd.getValidator().isCollection())
+                if (cd.getValidator().isCollection() && !isCustom)
                     throw new InvalidRequestException("Indexes on collections are no yet supported");
 
                 props.validate(isCustom);