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/03 02:07:18 UTC
[1/4] drill git commit: DRILL-4109 Increase timeout on merge join
tests.
Repository: drill
Updated Branches:
refs/heads/master 46c47a24f -> 3ae3bf5e1
DRILL-4109 Increase timeout on merge join tests.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/3ae3bf5e
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/3ae3bf5e
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/3ae3bf5e
Branch: refs/heads/master
Commit: 3ae3bf5e127b4384c7b91d797d36ea4d51a058ae
Parents: 33e3f1a
Author: Amit Hadke <am...@gmail.com>
Authored: Wed Dec 2 14:16:39 2015 -0800
Committer: Amit Hadke <am...@gmail.com>
Committed: Wed Dec 2 16:47:32 2015 -0800
----------------------------------------------------------------------
.../drill/exec/physical/impl/join/TestMergeJoinAdvanced.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/3ae3bf5e/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
index ec7411d..87058f2 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
@@ -24,7 +24,9 @@ import org.apache.drill.exec.planner.physical.PlannerSettings;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.TestRule;
import java.io.BufferedWriter;
import java.io.File;
@@ -33,6 +35,8 @@ import java.io.IOException;
import java.util.Random;
public class TestMergeJoinAdvanced extends BaseTestQuery {
+ @Rule
+ public final TestRule TIMEOUT = TestTools.getTimeoutRule(120000); // Longer timeout than usual.
// Have to disable hash join to test merge join in this class
@BeforeClass
[2/4] drill git commit: DRILL-4125 Fix for invalid inner cursor.
Posted by sm...@apache.org.
DRILL-4125 Fix for invalid inner cursor.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/42bf845d
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/42bf845d
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/42bf845d
Branch: refs/heads/master
Commit: 42bf845d282e0b86aef0d5bf8e6af693977c06c4
Parents: d44b889
Author: Amit Hadke <am...@gmail.com>
Authored: Tue Dec 1 15:39:42 2015 -0800
Committer: Amit Hadke <am...@gmail.com>
Committed: Wed Dec 2 16:47:32 2015 -0800
----------------------------------------------------------------------
.../drill/exec/record/RecordIterator.java | 21 +++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/42bf845d/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
index 7b5ec28..408514c 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
@@ -93,7 +93,7 @@ public class RecordIterator implements VectorAccessible {
// Release all batches before current batch. [0 to startBatchPosition).
final Map<Range<Long>,RecordBatchData> oldBatches = batches.subRangeMap(Range.closedOpen(0l, startBatchPosition)).asMapOfRanges();
for (Range<Long> range : oldBatches.keySet()) {
- oldBatches.get(range).clear();
+ oldBatches.get(range.lowerEndpoint()).clear();
}
batches.remove(Range.closedOpen(0l, startBatchPosition));
markedInnerPosition = innerPosition;
@@ -213,8 +213,23 @@ public class RecordIterator implements VectorAccessible {
throw new UnsupportedOperationException("Unsupported outcome received " + lastOutcome);
}
} else {
- outerPosition = nextOuterPosition;
- innerPosition = nextInnerPosition;
+ if (nextInnerPosition >= innerRecordCount) {
+ // move to next batch
+ final RecordBatchData rbdNew = batches.get(nextOuterPosition);
+ final RecordBatchData rbdOld = batches.get(outerPosition);
+ Preconditions.checkArgument(rbdNew != null);
+ Preconditions.checkArgument(rbdOld != null);
+ Preconditions.checkArgument(rbdOld != rbdNew);
+ container.transferOut(rbdOld.getContainer());
+ container.transferIn(rbdNew.getContainer());
+ innerPosition = 0;
+ outerPosition = nextOuterPosition;
+ startBatchPosition = batches.getEntry(outerPosition).getKey().lowerEndpoint();
+ innerRecordCount = (int)(batches.getEntry(outerPosition).getKey().upperEndpoint() - startBatchPosition);
+ } else {
+ outerPosition = nextOuterPosition;
+ innerPosition = nextInnerPosition;
+ }
}
return lastOutcome;
}
[3/4] drill git commit: Accidently reverted last change.
Posted by sm...@apache.org.
Accidently reverted last change.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/33e3f1aa
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/33e3f1aa
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/33e3f1aa
Branch: refs/heads/master
Commit: 33e3f1aa91b03ff751c9973e0e0b29e78bf43b5b
Parents: 42bf845
Author: Amit Hadke <am...@gmail.com>
Authored: Wed Dec 2 13:36:34 2015 -0800
Committer: Amit Hadke <am...@gmail.com>
Committed: Wed Dec 2 16:47:32 2015 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/drill/exec/record/RecordIterator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/33e3f1aa/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
index 408514c..77cb9a1 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
@@ -93,7 +93,7 @@ public class RecordIterator implements VectorAccessible {
// Release all batches before current batch. [0 to startBatchPosition).
final Map<Range<Long>,RecordBatchData> oldBatches = batches.subRangeMap(Range.closedOpen(0l, startBatchPosition)).asMapOfRanges();
for (Range<Long> range : oldBatches.keySet()) {
- oldBatches.get(range.lowerEndpoint()).clear();
+ oldBatches.get(range).clear();
}
batches.remove(Range.closedOpen(0l, startBatchPosition));
markedInnerPosition = innerPosition;
[4/4] drill git commit: DRILL-4109 Fix NPE in RecordIterator.
Posted by sm...@apache.org.
DRILL-4109 Fix NPE in RecordIterator.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/d44b889f
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/d44b889f
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/d44b889f
Branch: refs/heads/master
Commit: d44b889ffebbb58939110776795489c052aac786
Parents: 46c47a2
Author: Amit Hadke <am...@gmail.com>
Authored: Tue Nov 24 16:00:16 2015 -0800
Committer: Amit Hadke <am...@gmail.com>
Committed: Wed Dec 2 16:47:32 2015 -0800
----------------------------------------------------------------------
.../apache/drill/exec/record/RecordIterator.java | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/d44b889f/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
index faa4d83..7b5ec28 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordIterator.java
@@ -93,7 +93,7 @@ public class RecordIterator implements VectorAccessible {
// Release all batches before current batch. [0 to startBatchPosition).
final Map<Range<Long>,RecordBatchData> oldBatches = batches.subRangeMap(Range.closedOpen(0l, startBatchPosition)).asMapOfRanges();
for (Range<Long> range : oldBatches.keySet()) {
- oldBatches.get(range.lowerEndpoint()).clear();
+ oldBatches.get(range).clear();
}
batches.remove(Range.closedOpen(0l, startBatchPosition));
markedInnerPosition = innerPosition;
@@ -113,8 +113,9 @@ public class RecordIterator implements VectorAccessible {
}
innerPosition = markedInnerPosition;
outerPosition = markedOuterPosition;
- startBatchPosition = batches.getEntry(outerPosition).getKey().lowerEndpoint();
- innerRecordCount = (int)(batches.getEntry(outerPosition).getKey().upperEndpoint() - startBatchPosition);
+ final Range<Long> markedBatchRange = batches.getEntry(outerPosition).getKey();
+ startBatchPosition = markedBatchRange.lowerEndpoint();
+ innerRecordCount = (int)(markedBatchRange.upperEndpoint() - startBatchPosition);
markedInnerPosition = -1;
markedOuterPosition = -1;
}
@@ -133,9 +134,10 @@ public class RecordIterator implements VectorAccessible {
// Get vectors from new position.
container.transferIn(rbdNew.getContainer());
outerPosition = nextOuterPosition;
- startBatchPosition = batches.getEntry(outerPosition).getKey().lowerEndpoint();
+ final Range<Long> markedBatchRange = batches.getEntry(outerPosition).getKey();
+ startBatchPosition = markedBatchRange.lowerEndpoint();
innerPosition = (int)(outerPosition - startBatchPosition);
- innerRecordCount = (int)(batches.getEntry(outerPosition).getKey().upperEndpoint() - startBatchPosition);
+ innerRecordCount = (int)(markedBatchRange.upperEndpoint() - startBatchPosition);
}
/**
@@ -239,7 +241,9 @@ public class RecordIterator implements VectorAccessible {
public int getCurrentPosition() {
Preconditions.checkArgument(initialized);
- Preconditions.checkArgument(innerPosition >= 0 && innerPosition < innerRecordCount);
+ Preconditions.checkArgument(innerPosition >= 0 && innerPosition < innerRecordCount,
+ String.format("innerPosition:%d, outerPosition:%d, innerRecordCount:%d, totalRecordCount:%d",
+ innerPosition, outerPosition, innerRecordCount, totalRecordCount));
return innerPosition;
}