You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by hy...@apache.org on 2014/09/27 01:52:12 UTC

[6/8] git commit: TAJO-1070: BSTIndexScanExec should not seek a negative offset. (jinho)

TAJO-1070: BSTIndexScanExec should not seek a negative offset. (jinho)

Closes #159


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/55bfa680
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/55bfa680
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/55bfa680

Branch: refs/heads/block_iteration
Commit: 55bfa680bfac102e90a73c3f9c7436fabf85688e
Parents: 644b7cd
Author: jhkim <jh...@apache.org>
Authored: Fri Sep 26 11:06:16 2014 +0900
Committer: jhkim <jh...@apache.org>
Committed: Fri Sep 26 11:06:16 2014 +0900

----------------------------------------------------------------------
 CHANGES                                                          | 2 ++
 .../apache/tajo/engine/planner/physical/BSTIndexScanExec.java    | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/55bfa680/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 6a64bc9..feaf7ba 100644
--- a/CHANGES
+++ b/CHANGES
@@ -434,6 +434,8 @@ Release 0.9.0 - unreleased
 
   TASKS
 
+    TAJO-1070: BSTIndexScanExec should not seek a negative offset. (jinho)
+
     TAJO-1054: Wrong comment in ByteUtils.splitWorker(). 
     (Jongyoung Park via jinho)
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/55bfa680/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/BSTIndexScanExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/BSTIndexScanExec.java b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/BSTIndexScanExec.java
index f831525..bdd1e07 100644
--- a/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/BSTIndexScanExec.java
+++ b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/BSTIndexScanExec.java
@@ -114,7 +114,9 @@ public class BSTIndexScanExec extends PhysicalExec {
            projector.eval(tuple, outTuple);
            return outTuple;
          } else {
-           fileScanner.seek(reader.next());
+           long offset = reader.next();
+           if (offset == -1) return null;
+           else fileScanner.seek(offset);
          }
        }
      }