Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill >> mail # dev >> [3/3] git commit: Reduce the likelihood of phantom schema changes in distributed query plans.


Copy link to this message
-
[3/3] git commit: Reduce the likelihood of phantom schema changes in distributed query plans.
Reduce the likelihood of phantom schema changes in distributed query plans.
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/98bc9e19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/98bc9e19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/98bc9e19

Branch: refs/heads/master
Commit: 98bc9e19c153ac6f70ec58fbe37fcb2abc9de3f7
Parents: a8bfbf1
Author: Jacques Nadeau <[EMAIL PROTECTED]>
Authored: Thu Sep 5 21:17:58 2013 -0700
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Thu Sep 5 22:39:55 2013 -0700

----------------------------------------------------------------------
 .../org/apache/drill/exec/physical/impl/ScanBatch.java  |  2 +-
 .../drill/exec/physical/impl/aggregate/AggBatch.java    |  2 +-
 .../apache/drill/exec/physical/impl/sort/SortBatch.java |  4 ++--
 .../apache/drill/exec/record/AbstractRecordBatch.java   |  2 +-
 .../drill/exec/record/AbstractSingleRecordBatch.java    |  2 +-
 .../apache/drill/exec/record/HyperVectorWrapper.java    |  4 ++--
 .../apache/drill/exec/record/SimpleVectorWrapper.java   |  2 +-
 .../org/apache/drill/exec/record/VectorContainer.java   | 12 ++++++++----
 .../org/apache/drill/exec/record/VectorWrapper.java     |  2 +-
 .../drill/exec/record/selection/SelectionVector4.java   |  2 ++
 .../apache/drill/exec/vector/BaseDataValueVector.java   | 12 +++++++++---
 .../exec/store/parquet/ParquetRecordReaderTest.java     |  2 +-
 12 files changed, 30 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/98bc9e19/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java
index ae043ec..a02e5f7 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScanBatch.java
@@ -156,7 +156,7 @@ public class ScanBatch implements RecordBatch {
     @Override
     public void removeAllFields() {
       for(VectorWrapper<?> vw : container){
-        vw.release();
+        vw.clear();
       }
       container.clear();
       fieldVectorMap.clear();

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/98bc9e19/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/AggBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/AggBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/AggBatch.java
index 97e66f9..806239b 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/AggBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/AggBatch.java
@@ -90,7 +90,7 @@ public class AggBatch extends AbstractRecordBatch<StreamingAggregate> {
       logger.debug("Aggregator response {}, records {}", out, aggregator.getOutputCount());
       switch(out){
       case CLEANUP_AND_RETURN:
-        container.clear();
+        container.zeroVectors();
         done = true;
         return aggregator.getOutcome();
       case RETURN_OUTCOME:

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/98bc9e19/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/SortBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/SortBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/SortBatch.java
index 09ae687..61bcf34 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/SortBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/SortBatch.java
@@ -75,7 +75,7 @@ public class SortBatch extends AbstractRecordBatch<Sort> {
   @Override
   protected void cleanup() {
     super.cleanup();
-    container.clear();
+    container.zeroVectors();;
     sv4.clear();
   }
 
@@ -98,7 +98,7 @@ public class SortBatch extends AbstractRecordBatch<Sort> {
           break outer;
         case NOT_YET:
         case STOP:
-          container.clear();
+          container.zeroVectors();
           return upstream;
         case OK_NEW_SCHEMA:
           // only change in the case that the schema truly changes.  Artificial schema changes are ignored.

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/98bc9e19/exec/java-exec/src/main/java/org/apache/drill/exec/record/AbstractRecordBatch.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/record/AbstractRecordBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/record/AbstractRecordBatch.java
index 0d44368..aba023d 100644
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/record/AbstractRecordBatch.java
@@ -42,7 +42,7 @@ public abstract class AbstractRecordBatch<T extends PhysicalOperator> implements
 
   @Override
   public void kill() {
-    container.clear();
+    container.zeroVectors();
     killIncoming();
     cleanup();
   }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/98bc9e19/exec/java-exec/src/main/java/org/apache/drill/exec/record/AbstractSingleRecordBatch.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/record/AbstractSingleRecordBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/record/AbstractSingleRecordBatch.java
index fb2fc3a..63c31a4 100644
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/record/AbstractSingleRecordBatch.java
@@ -29,7 +29,7 @@ public abstract class AbstractSingleRecordBatch<T e