Repository: phoenix Updated Branches: refs/heads/master 241bb3b44 -> 63648fa5b
PHOENIX-1133 Skip scan intersect method not reseting state correctly Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/63648fa5 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/63648fa5 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/63648fa5 Branch: refs/heads/master Commit: 63648fa5b5c6d1e8a0d41aa4c20f4f3c4dbd9ecc Parents: 241bb3b Author: James Taylor <[email protected]> Authored: Wed Jul 30 11:44:42 2014 -0700 Committer: James Taylor <[email protected]> Committed: Wed Jul 30 12:34:58 2014 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/phoenix/filter/SkipScanFilter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/63648fa5/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java b/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java index 13113c8..5cee0d7 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/filter/SkipScanFilter.java @@ -156,10 +156,15 @@ public class SkipScanFilter extends FilterBase implements Writable { return true; } + private void resetState() { + isDone = false; + endKeyLength = 0; + Arrays.fill(position, 0); + } + private boolean intersect(byte[] lowerInclusiveKey, byte[] upperExclusiveKey, List<List<KeyRange>> newSlots) { + resetState(); boolean lowerUnbound = (lowerInclusiveKey.length == 0); - Arrays.fill(position, 0); - isDone = false; int startPos = 0; int lastSlot = slots.size()-1; if (!lowerUnbound) {
