commit | e6b4460ce273507a4f4d777f56edf1561824b45c | [log] [tgz] |
---|---|---|
author | salsubaiee <salsubaiee@123451ca-8445-de46-9d55-352943316053> | Thu Feb 14 21:46:47 2013 +0000 |
committer | salsubaiee <salsubaiee@123451ca-8445-de46-9d55-352943316053> | Thu Feb 14 21:46:47 2013 +0000 |
tree | adfe1d2ab4bf6b32bbf9370b127544a2bb28baa0 | |
parent | 68bd9de4831e949784b7385419fe3a98114fa493 [diff] |
Fixed a bug that could lead to wrong identification of LSM-BTree point searches. git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_lsm_tree@2928 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-storage-am-lsm-btree/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/btree/impls/LSMBTreeSearchCursor.java b/hyracks-storage-am-lsm-btree/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/btree/impls/LSMBTreeSearchCursor.java index b15b88c..82da312 100644 --- a/hyracks-storage-am-lsm-btree/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/btree/impls/LSMBTreeSearchCursor.java +++ b/hyracks-storage-am-lsm-btree/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/btree/impls/LSMBTreeSearchCursor.java
@@ -55,8 +55,8 @@ if (btreePred.getLowKeyComparator().getKeyFieldCount() == btreePred.getHighKeyComparator() .getKeyFieldCount()) { if (btreePred.getLowKeyComparator().getKeyFieldCount() == lsmInitialState - .getBloomFilterComparator().getKeyFieldCount()) { - if (lsmInitialState.getBloomFilterComparator().compare(btreePred.getLowKey(), + .getOriginalKeyComparator().getKeyFieldCount()) { + if (lsmInitialState.getOriginalKeyComparator().compare(btreePred.getLowKey(), btreePred.getHighKey()) == 0) { searchType = LSMBTreeSearchType.POINT; } @@ -89,7 +89,9 @@ @Override public void close() throws HyracksDataException { - currentCursor.close(); + if (currentCursor != null) { + currentCursor.close(); + } } @Override