geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject incubator-geode git commit: GEODE-1745: Fixed the comparison during query re-evaluation using CompactMapRangeIndexes
Date Mon, 15 Aug 2016 21:12:49 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 6f37769cd -> f8f8986f3


GEODE-1745: Fixed the comparison during query re-evaluation using CompactMapRangeIndexes

	* Initially the object to be searched was compared with the tuple returned by the Compact
Range Index which contains the object to be searched and a key
	* This led to mismatch to occur resulting in false query results.
	* Fixed to compare with the first element of the tuple returned by the compact range index.


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

Branch: refs/heads/develop
Commit: f8f8986f39616114a97e7e7b9bad3af712e52f1f
Parents: 6f37769
Author: nabarun <nnag@pivotal.io>
Authored: Wed Aug 10 14:15:29 2016 -0700
Committer: nabarun <nnag@pivotal.io>
Committed: Mon Aug 15 14:11:55 2016 -0700

----------------------------------------------------------------------
 .../gemfire/cache/query/internal/index/CompactRangeIndex.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f8f8986f/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java
b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java
index d0a0ee5..ecfafb1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndex.java
@@ -984,6 +984,9 @@ public class CompactRangeIndex extends AbstractIndex {
 
     if (key != null) {
       right = key.evaluate(context);
+      if(null != right  && indexInfo._getIndex() instanceof CompactMapRangeIndex){
+        right = ((Object[])right)[0];
+      }
     } else {
       right = keyVal;
     }


Mime
View raw message