drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject drill git commit: DRILL-4165 Add a precondition for size of merge join record batch.
Date Tue, 08 Dec 2015 03:01:28 GMT
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 <amit.hadke@gmail.com>
Authored: Mon Dec 7 17:25:34 2015 -0800
Committer: Amit Hadke <amit.hadke@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() {


Mime
View raw message