summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo/map
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2008-05-14 07:36:46 +0000
committerBrian S. O'Neill <bronee@gmail.com>2008-05-14 07:36:46 +0000
commitf12b9657cbd868c106b49d90067a108d98bf94b5 (patch)
tree27bf09ecac8f5669445801ef6ead1f4976ec33a9 /src/main/java/com/amazon/carbonado/repo/map
parente92671b55bdf22839b219d2da4ac35ffb0df18f8 (diff)
Fix reverse range filter.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/map')
-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();