Updated Branches:
  refs/heads/master 113d4b9f8 -> 6e39efc4b

Add support for Float8 functions
Move MockRecordReader to use AllocationHelper
Change pom.xml to exclude other eclipse incompatible plugins for m2eclipse


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

Branch: refs/heads/master
Commit: 6e39efc4bcf5a518398076034018a5e8a8829836
Parents: 113d4b9
Author: Jacques Nadeau <[email protected]>
Authored: Tue Jul 23 12:35:41 2013 -0700
Committer: Jacques Nadeau <[email protected]>
Committed: Tue Jul 23 12:35:41 2013 -0700

----------------------------------------------------------------------
 .../apache/drill/exec/expr/CodeGenerator.java   |  6 ++++
 .../drill/exec/expr/holders/Float8Holder.java   | 14 ++++++++++
 .../exec/expr/holders/NullableFloat8Holder.java | 13 +++++++++
 .../exec/physical/config/MockRecordReader.java  |  9 ++----
 sandbox/prototype/pom.xml                       | 29 ++++++++++++++++++++
 5 files changed, 64 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/6e39efc4/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/CodeGenerator.java
----------------------------------------------------------------------
diff --git 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/CodeGenerator.java
 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/CodeGenerator.java
index b99af19..b8dc2ce 100644
--- 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/CodeGenerator.java
+++ 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/CodeGenerator.java
@@ -10,9 +10,11 @@ import org.apache.drill.exec.compile.TemplateClassDefinition;
 import org.apache.drill.exec.exception.SchemaChangeException;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.expr.holders.BooleanHolder;
+import org.apache.drill.exec.expr.holders.Float8Holder;
 import org.apache.drill.exec.expr.holders.IntHolder;
 import org.apache.drill.exec.expr.holders.LongHolder;
 import org.apache.drill.exec.expr.holders.NullableBooleanHolder;
+import org.apache.drill.exec.expr.holders.NullableFloat8Holder;
 import org.apache.drill.exec.expr.holders.NullableIntHolder;
 import org.apache.drill.exec.expr.holders.NullableLongHolder;
 import org.apache.drill.exec.ops.FragmentContext;
@@ -207,6 +209,8 @@ public class CodeGenerator<T> {
         return model._ref(IntHolder.class);
       case BIGINT:  
         return model._ref(LongHolder.class);
+      case FLOAT8:
+        return model._ref(Float8Holder.class);
       
       }
       
@@ -218,6 +222,8 @@ public class CodeGenerator<T> {
         return model._ref(NullableIntHolder.class);
       case BIGINT:  
         return model._ref(NullableLongHolder.class);
+      case FLOAT8:
+        return model._ref(NullableFloat8Holder.class);
       }
 
     }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/6e39efc4/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/Float8Holder.java
----------------------------------------------------------------------
diff --git 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/Float8Holder.java
 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/Float8Holder.java
new file mode 100644
index 0000000..78e7cb8
--- /dev/null
+++ 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/Float8Holder.java
@@ -0,0 +1,14 @@
+package org.apache.drill.exec.expr.holders;
+
+import org.apache.drill.common.types.TypeProtos.MajorType;
+import org.apache.drill.common.types.TypeProtos.MinorType;
+import org.apache.drill.common.types.Types;
+
+public class Float8Holder implements ValueHolder {
+  static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(Float8Holder.class);
+  
+  public static final MajorType TYPE = Types.required(MinorType.FLOAT8);
+  public double value;
+  public int isSet;
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/6e39efc4/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/NullableFloat8Holder.java
----------------------------------------------------------------------
diff --git 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/NullableFloat8Holder.java
 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/NullableFloat8Holder.java
new file mode 100644
index 0000000..f8fa224
--- /dev/null
+++ 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/NullableFloat8Holder.java
@@ -0,0 +1,13 @@
+package org.apache.drill.exec.expr.holders;
+
+import org.apache.drill.common.types.TypeProtos.MajorType;
+import org.apache.drill.common.types.TypeProtos.MinorType;
+import org.apache.drill.common.types.Types;
+
+public class NullableFloat8Holder implements ValueHolder{
+  static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(NullableFloat8Holder.class);
+  
+  public static final MajorType TYPE = Types.optional(MinorType.FLOAT8);
+  public double value;
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/6e39efc4/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/MockRecordReader.java
----------------------------------------------------------------------
diff --git 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/MockRecordReader.java
 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/MockRecordReader.java
index d710d78..687b28b 100644
--- 
a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/MockRecordReader.java
+++ 
b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/MockRecordReader.java
@@ -29,6 +29,7 @@ import 
org.apache.drill.exec.physical.config.MockScanPOP.MockScanEntry;
 import org.apache.drill.exec.physical.impl.OutputMutator;
 import org.apache.drill.exec.record.MaterializedField;
 import org.apache.drill.exec.store.RecordReader;
+import org.apache.drill.exec.vector.AllocationHelper;
 import org.apache.drill.exec.vector.FixedWidthVector;
 import org.apache.drill.exec.vector.NonRepeatedMutator;
 import org.apache.drill.exec.vector.TypeHelper;
@@ -65,13 +66,7 @@ public class MockRecordReader implements RecordReader {
     MaterializedField f = MaterializedField.create(new SchemaPath(name, 
ExpressionPosition.UNKNOWN), type);
     ValueVector v;
     v = TypeHelper.getNewVector(f, context.getAllocator());
-    if(v instanceof FixedWidthVector){
-      ((FixedWidthVector)v).allocateNew(length);  
-    }else if(v instanceof VariableWidthVector){
-      ((VariableWidthVector)v).allocateNew(50*length, length);
-    }else{
-      throw new UnsupportedOperationException(String.format("Unable to get 
allocate vector %s", v.getClass().getName()));
-    }
+    AllocationHelper.allocate(v, length, 50);
     
     return v;
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/6e39efc4/sandbox/prototype/pom.xml
----------------------------------------------------------------------
diff --git a/sandbox/prototype/pom.xml b/sandbox/prototype/pom.xml
index 2e5dd02..4d50916 100644
--- a/sandbox/prototype/pom.xml
+++ b/sandbox/prototype/pom.xml
@@ -163,6 +163,35 @@
                     <versionRange>[1.0,)</versionRange>
                     <goals>
                       <goal>run</goal>
+                      <goal>generate</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-enforcer-plugin</artifactId>
+                    <versionRange>[1.2,)</versionRange>
+                    <goals>
+                      <goal>enforce</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>
+                      maven-remote-resources-plugin
+                    </artifactId>
+                    <versionRange>[1.1,)</versionRange>
+                    <goals>
+                      <goal>process</goal>
                     </goals>
                   </pluginExecutionFilter>
                   <action>

Reply via email to