cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Fix SELECT validation
Date Wed, 24 Jul 2013 10:37:20 GMT
Updated Branches:
  refs/heads/trunk 7b841aade -> 4021fffa0


Fix SELECT validation


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

Branch: refs/heads/trunk
Commit: 4021fffa0c252b36a872501449d292e0828dd182
Parents: 7b841aa
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Jul 24 12:36:58 2013 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Jul 24 12:37:11 2013 +0200

----------------------------------------------------------------------
 .../apache/cassandra/cql3/statements/SelectStatement.java   | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4021fffa/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index ce0d50b..2f9627b 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -1176,12 +1176,9 @@ public class SelectStatement implements CQLStatement
                 }
                 else
                 {
-                    if (hasQueriableIndex)
-                    {
-                        stmt.usesSecondaryIndexing = true;
-                        break;
-                    }
-                    throw new InvalidRequestException("Only EQ and IN relation are supported
on the partition key for random partitioners (unless you use the token() function)");
+                    // Non EQ relation is not supported without token(), even if we have
a 2ndary index (since even those are ordered by partitioner).
+                    // Note: In theory we could allow it for 2ndary index queries with ALLOW
FILTERING, but that would probably require some special casing
+                    throw new InvalidRequestException("Only EQ and IN relation are supported
on the partition key (unless you use the token() function)");
                 }
                 previous = cname;
             }


Mime
View raw message