asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Maxon (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Fix for ASTERIXDB-1879
Date Tue, 11 Apr 2017 02:24:05 GMT
Ian Maxon has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1672

Change subject: Fix for ASTERIXDB-1879
......................................................................

Fix for ASTERIXDB-1879

The issue was the filter was not persisted correctly for a number
of reasons.

Change-Id: I63734838235e86ee9f0127663f73f65444c423bb
---
M hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/frames/LSMComponentFilterReference.java
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/72/1672/1

diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/frames/LSMComponentFilterReference.java
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/frames/LSMComponentFilterReference.java
index f04cbb0..5f2c36a 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/frames/LSMComponentFilterReference.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/frames/LSMComponentFilterReference.java
@@ -103,13 +103,14 @@
             }
             binaryFilter.setSize(binarySize);
             byte[] buf = binaryFilter.getByteArray();
-            BooleanPointable.setBoolean(buf, MIN_SET_INDICATOR_OFFSET, min.getLength() ==
0);
-            BooleanPointable.setBoolean(buf, MAX_SET_INDICATOR_OFFSET, max.getLength() ==
0);
+            BooleanPointable.setBoolean(buf, MIN_SET_INDICATOR_OFFSET, min.getLength() >
0);
+            BooleanPointable.setBoolean(buf, MAX_SET_INDICATOR_OFFSET, max.getLength() >
0);
             int offset = 2;
             if (min.getLength() > 0) {
                 IntegerPointable.setInteger(buf, offset, min.getLength());
                 offset += Integer.BYTES;
                 System.arraycopy(min.getByteArray(), 0, buf, offset, min.getLength());
+                offset += min.getLength();
             }
             if (max.getLength() > 0) {
                 IntegerPointable.setInteger(buf, offset, max.getLength());
@@ -127,6 +128,12 @@
 
     @Override
     public int getLength() {
+        if(binaryFilter.getLength() <=0){
+            if(isMinTupleSet() || isMaxTupleSet()) {
+                getByteArray();
+            }
+
+        }
         return binaryFilter.getLength();
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1672
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63734838235e86ee9f0127663f73f65444c423bb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <imaxon@apache.org>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Mime
View raw message