cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [2/3] cassandra git commit: Fix primary index calculation for SASI
Date Wed, 07 Dec 2016 15:49:29 GMT
Fix primary index calculation for SASI

Patch by Corentin Chary; reviewed by Alex Petrov for CASSANDRA-12910.


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

Branch: refs/heads/trunk
Commit: 7b1e2ed6e3d97e445cfdc877b190feafa1550fd5
Parents: d7b6b7a
Author: Corentin Chary <corentin.chary@gmail.com>
Authored: Tue Dec 6 14:59:25 2016 +0100
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Dec 7 15:48:36 2016 +0000

----------------------------------------------------------------------
 CHANGES.txt                                                        | 2 ++
 src/java/org/apache/cassandra/index/sasi/plan/QueryController.java | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7b1e2ed6/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8b2bed7..b581977 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.12
+ * Fix primary index calculation for SASI (CASSANDRA-12910)
  * Expose time spent waiting in thread pool queue (CASSANDRA-8398)
  * Conditionally update index built status to avoid unnecessary flushes (CASSANDRA-12969)
  * NoReplicationTokenAllocator should work with zero replication factor (CASSANDRA-12983)
@@ -6,6 +7,7 @@
  * Add support for arithmetic operators (CASSANDRA-11935)
  * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 
+
 3.10
  * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
  * Remove timing window in test case (CASSANDRA-12875)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7b1e2ed6/src/java/org/apache/cassandra/index/sasi/plan/QueryController.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/index/sasi/plan/QueryController.java b/src/java/org/apache/cassandra/index/sasi/plan/QueryController.java
index fa1181f..155cd4f 100644
--- a/src/java/org/apache/cassandra/index/sasi/plan/QueryController.java
+++ b/src/java/org/apache/cassandra/index/sasi/plan/QueryController.java
@@ -236,7 +236,7 @@ public class QueryController
                 continue;
 
             Set<SSTableIndex> indexes = applyScope(view.match(e));
-            if (primaryIndexes.size() > indexes.size())
+            if (expression == null || primaryIndexes.size() > indexes.size())
             {
                 primaryIndexes = indexes;
                 expression = e;


Mime
View raw message