cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Allow creating CUSTOM indexes on collections
Date Wed, 05 Jun 2013 14:30:38 GMT
Updated Branches:
  refs/heads/trunk 523e68376 -> 4b9f1e2ba


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/trunk
Commit: ca3c75ecb22fa13e2f58129df83073800ff451ef
Parents: 1f48695
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Jun 5 17:22:04 2013 +0300
Committer: Aleksey Yeschenko <aleksey@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);


Mime
View raw message