summaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/map/MapStorage.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/map/MapStorage.java b/src/main/java/com/amazon/carbonado/repo/map/MapStorage.java
index 1457fae..a15796c 100644
--- a/src/main/java/com/amazon/carbonado/repo/map/MapStorage.java
+++ b/src/main/java/com/amazon/carbonado/repo/map/MapStorage.java
@@ -728,8 +728,14 @@ class MapStorage<S extends Storable>
filter = filter.and(index.getProperty(i).getName(), RelOp.EQ);
}
- filter = filter.and(index.getProperty(i).getName(),
- rangeEndBoundary == BoundaryType.INCLUSIVE ? RelOp.LE : RelOp.LT);
+ RelOp rangeOp;
+ if (reverseRange) {
+ rangeOp = rangeEndBoundary == BoundaryType.INCLUSIVE ? RelOp.GE : RelOp.GT;
+ } else {
+ rangeOp = rangeEndBoundary == BoundaryType.INCLUSIVE ? RelOp.LE : RelOp.LT;
+ }
+
+ filter = filter.and(index.getProperty(i).getName(), rangeOp);
filterValues = filter.initialFilterValues();