cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [4/7] cassandra git commit: Fix primary index calculation for SASI
Date Sun, 05 Feb 2017 17:02:05 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/a2dffc2b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a2dffc2b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a2dffc2b

Branch: refs/heads/cassandra-3.11
Commit: a2dffc2b49e0471ed6c351121fb02a6a0f61b51e
Parents: 1fd4e87
Author: Corentin Chary <corentin.chary@gmail.com>
Authored: Tue Dec 6 14:59:25 2016 +0100
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Sun Feb 5 16:58:30 2017 +0000

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a2dffc2b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7d5057a..d81d472 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,7 @@
  * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034)
  * nodetool stopdaemon errors out (CASSANDRA-13030)
  * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
+ * Fix primary index calculation for SASI (CASSANDRA-12910)
 Merged from 3.0:
  * Fix handling of partition with partition-level deletion plus
    live rows in sstabledump (CASSANDRA-13177)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a2dffc2b/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