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

Switch to Threaded View
Drill >> mail # dev >> [52/53] [abbrv] git commit: Updates to support SelectionVector removal


Copy link to this message
-
[52/53] [abbrv] git commit: Updates to support SelectionVector removal
Updates to support SelectionVector removal
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/f0013215
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/f0013215
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/f0013215

Branch: refs/heads/master
Commit: f00132151a7946c9541f6317efb763325aef2874
Parents: 7779a72
Author: Jacques Nadeau <[EMAIL PROTECTED]>
Authored: Fri Jul 19 14:40:57 2013 -0700
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Fri Jul 19 14:57:51 2013 -0700

----------------------------------------------------------------------
 .../common/expression/fn/StringFunctions.java   |   4 +-
 .../org/apache/drill/common/types/Types.java    |  19 +-
 .../common/src/main/protobuf/Types.proto        |   2 -
 .../ValueVectors/data/ValueVectorTypes.tdd      |  17 +-
 .../templates/FixedValueVectors.java            |  32 +-
 .../templates/NullableValueVectors.java         |  40 +--
 .../templates/RepeatedValueVectors.java         |   5 +
 .../templates/VariableLengthVectors.java        |  34 ++-
 .../drill/exec/compile/QueryClassLoader.java    |  18 +-
 .../apache/drill/exec/expr/CodeGenerator.java   |  21 +-
 .../drill/exec/expr/annotations/Workspace.java  |  14 +
 .../apache/drill/exec/ops/FragmentContext.java  |   2 +-
 .../physical/config/SelectionVectorRemover.java |  60 ++++
 .../drill/exec/physical/impl/ImplCreator.java   |  13 +
 .../drill/exec/physical/impl/ScanBatch.java     |   2 +-
 .../physical/impl/filter/FilterRecordBatch.java |   2 +-
 .../impl/project/ProjectRecordBatch.java        |   4 +-
 .../exec/physical/impl/svremover/Copier.java    |  18 ++
 .../physical/impl/svremover/CopierTemplate.java |  43 +++
 .../physical/impl/svremover/CopyEvaluator.java  |  11 +
 .../impl/svremover/RemovingRecordBatch.java     | 305 +++++++++++++++++++
 .../impl/svremover/SVRemoverCreator.java        |  23 ++
 .../apache/drill/exec/record/RecordBatch.java   |  46 +--
 .../drill/exec/record/RecordBatchLoader.java    |   2 +-
 .../drill/exec/record/RecordRemapper.java       |   8 +
 .../apache/drill/exec/record/WritableBatch.java |  39 +--
 .../drill/exec/vector/BaseDataValueVector.java  |   4 +-
 .../drill/exec/vector/BaseValueVector.java      |   3 +
 .../org/apache/drill/exec/vector/BitVector.java |  21 +-
 .../drill/exec/vector/FixedWidthVector.java     |   2 +
 .../drill/exec/vector/NonRepeatedMutator.java   |   2 +-
 .../apache/drill/exec/vector/ValueVector.java   |   2 +
 .../drill/exec/vector/VariableWidthVector.java  |   2 +
 .../exec/physical/impl/SimpleRootExec.java      |  13 +-
 .../physical/impl/filter/TestSimpleFilter.java  |   4 +-
 .../impl/project/TestSimpleProjection.java      |   3 +-
 .../physical/impl/svremover/TestSVRemover.java  |  64 ++++
 .../src/test/resources/remover/test1.json       |  39 +++
 .../src/test/resources/scan_screen_logical.json |   2 +-
 39 files changed, 813 insertions(+), 132 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/f0013215/sandbox/prototype/common/src/main/java/org/apache/drill/common/expression/fn/StringFunctions.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/common/src/main/java/org/apache/drill/common/expression/fn/StringFunctions.java b/sandbox/prototype/common/src/main/java/org/apache/drill/common/expression/fn/StringFunctions.java
index 568b209..565843f 100644
--- a/sandbox/prototype/common/src/main/java/org/apache/drill/common/expression/fn/StringFunctions.java
+++ b/sandbox/prototype/common/src/main/java/org/apache/drill/common/expression/fn/StringFunctions.java
@@ -31,8 +31,8 @@ public class StringFunctions implements CallProvider{
   public FunctionDefinition[] getFunctionDefintions() {
     return new FunctionDefinition[]{
         FunctionDefinition.simple("regex_like", new BasicArgumentValidator( //
-            new Arg(true, false, "pattern", MinorType.VARCHAR1, MinorType.VARCHAR2, MinorType.VARCHAR4), //
-            new Arg(false, true, "value", MinorType.FIXEDCHAR, MinorType.VARCHAR1, MinorType.VARCHAR2, MinorType.VARCHAR4) ), FixedType.FIXED_BOOLEAN),
+            new Arg(true, false, "pattern", MinorType.VARCHAR2, MinorType.VARCHAR4), //
+            new Arg(false, true, "value", MinorType.FIXEDCHAR, MinorType.VARCHAR2, MinorType.VARCHAR4) ), FixedType.FIXED_BOOLEAN),
     };
 
   }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/f0013215/sandbox/prototype/common/src/main/java/org/apache/drill/common/types/Types.java
diff --git a/sandbox/prototype/common/src/main/java/org/apache/drill/common/types/Types.java b/sandbox/prototype/common/src/main/java/org/apache/drill/common/types/Types.java
index e1343ab..757bed0 100644
+++ b/sandbox/prototype/common/src/main/java/org/apache/drill/common/types/Types.java
@@ -39,11 +39,27 @@ public class Types {
     }
   }
  
+  public static boolean isFixedWidthType(MajorType type){
+    switch(type.getMinorType()){
+    case MSGPACK2:
+    case MSGPACK4:
+    case PROTO2:
+    case PROTO4:
+    case VARBINARY2:
+    case VARBINARY4:
+    case VARCHAR2:
+    case VARCHAR4:
+      return false;
+    default:
+      return true;
+    }
+  }
+  
+  
   public static boolean isStringScalarType(MajorType type){
     if(type.getMode() == DataMode.REPEATED) return false;
     switch(type.getMinorType()){
     case FIXEDCHAR:
-    case VARCHAR1:
     case VARCHAR2:
     case VARCHAR4:
       return true;
@@ -56,7 +72,6 @@ public class Types {
     if(type.getMode() == DataMode.REPEATED) return false;
     switch(type.getMinorType()){
     case FIXEDBINARY:
-    case VARBINARY1:
     case VARBINARY2:
     case VARBINARY4:
       return true;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/f0013215/sandbox/prototype/common/src/main/protobuf/Types.proto
diff --git a/sandbox/prototype/