You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by sm...@apache.org on 2015/12/08 04:01:28 UTC

drill git commit: DRILL-4165 Add a precondition for size of merge join record batch.

Repository: drill
Updated Branches:
  refs/heads/master fe3da5ce9 -> b90681171


DRILL-4165 Add a precondition for size of merge join record batch.


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

Branch: refs/heads/master
Commit: b9068117177c3b47025f52c00f67938e0c3e4732
Parents: fe3da5c
Author: Amit Hadke <am...@gmail.com>
Authored: Mon Dec 7 17:25:34 2015 -0800
Committer: Amit Hadke <am...@gmail.com>
Committed: Mon Dec 7 17:25:34 2015 -0800

----------------------------------------------------------------------
 .../org/apache/drill/exec/physical/impl/join/JoinStatus.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/b9068117/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java
index e968236..9e31763 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java
@@ -17,6 +17,7 @@
  */
 package org.apache.drill.exec.physical.impl.join;
 
+import com.google.common.base.Preconditions;
 import org.apache.drill.exec.physical.impl.join.JoinWorker.JoinOutcome;
 import org.apache.drill.exec.record.RecordBatch.IterOutcome;
 import org.apache.drill.exec.record.RecordIterator;
@@ -99,7 +100,8 @@ public final class JoinStatus {
   }
 
   public final boolean isOutgoingBatchFull() {
-    return outputPosition >= OUTPUT_BATCH_SIZE;
+    Preconditions.checkArgument(outputPosition <= OUTPUT_BATCH_SIZE);
+    return outputPosition == OUTPUT_BATCH_SIZE;
   }
 
   public final void incOutputPos() {