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

Switch to Threaded View
Drill >> mail # dev >> [51/53] [abbrv] git commit: Initial working filter operator


Copy link to this message
-
[51/53] [abbrv] git commit: Initial working filter operator
Initial working filter operator
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/65e2cfce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/65e2cfce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/65e2cfce

Branch: refs/heads/master
Commit: 65e2cfce5364ccfe30b83b9dddeb304b79efbc76
Parents: 57de7ed
Author: Jacques Nadeau <[EMAIL PROTECTED]>
Authored: Wed Jul 17 00:27:31 2013 -0700
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Fri Jul 19 14:53:31 2013 -0700

----------------------------------------------------------------------
 .../org/apache/drill/exec/cache/HazelCache.java |   1 -
 .../drill/exec/compile/ClassTransformer.java    |  17 +-
 .../drill/exec/compile/JDKClassCompiler.java    |   5 +-
 .../exec/compile/TemplateClassDefinition.java   |  24 +--
 .../apache/drill/exec/expr/CodeGenerator.java   |  20 +-
 .../drill/exec/expr/EvaluationVisitor.java      |  22 +-
 .../drill/exec/expr/fn/FunctionConverter.java   |   2 +-
 .../exec/expr/fn/MethodGrabbingVisitor.java     |   3 +-
 .../apache/drill/exec/ops/FragmentContext.java  |   9 +-
 .../drill/exec/physical/impl/ImplCreator.java   |  10 +-
 .../drill/exec/physical/impl/ScanBatch.java     |  11 +-
 .../exec/physical/impl/WireRecordBatch.java     |   8 +-
 .../physical/impl/filter/ExampleFilter.java     | 111 ----------
 .../impl/filter/FilterBatchCreator.java         |  23 +++
 .../physical/impl/filter/FilterEvaluator.java   |  10 +
 .../physical/impl/filter/FilterRecordBatch.java | 200 +++++++++++++++++++
 .../physical/impl/filter/FilterTemplate.java    |  63 ++++--
 .../exec/physical/impl/filter/Filterer.java     |  19 ++
 .../impl/filter/ReturnValueExpression.java      |  39 ++++
 .../SelectionVectorPopulationExpression.java    |  39 ----
 .../physical/impl/project/ProjectEvaluator.java |   4 +-
 .../impl/project/ProjectRecordBatch.java        |  11 +-
 .../exec/physical/impl/project/Projector.java   |   2 +-
 .../impl/project/ProjectorTemplate.java         |  10 +-
 .../apache/drill/exec/record/RecordBatch.java   |   3 +-
 .../drill/exec/record/RecordBatchLoader.java    |   4 +-
 .../apache/drill/exec/record/SchemaBuilder.java |   2 +-
 .../exec/record/selection/SelectionVector2.java |  36 +++-
 .../drill/exec/store/JSONRecordReader.java      |   3 +-
 .../exec/compile/TestClassTransformation.java   |   2 +-
 .../apache/drill/exec/expr/ExpressionTest.java  |   2 +-
 .../exec/physical/impl/SimpleRootExec.java      |   4 +
 .../physical/impl/filter/TestSimpleFilter.java  |  58 ++++++
 .../record/ExpressionTreeMaterializerTest.java  |   2 +-
 .../drill/exec/store/JSONRecordReaderTest.java  |   3 +-
 .../src/test/resources/filter/test1.json        |  34 ++++
 36 files changed, 566 insertions(+), 250 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/65e2cfce/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/cache/HazelCache.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/cache/HazelCache.java b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/cache/HazelCache.java
index f4fdbfa..fe4a212 100644
--- a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/cache/HazelCache.java
+++ b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/cache/HazelCache.java
@@ -29,7 +29,6 @@ import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
 import org.apache.drill.exec.proto.ExecProtos.PlanFragment;
 import org.apache.drill.exec.proto.ExecProtos.WorkQueueStatus;
 
-import com.beust.jcommander.internal.Lists;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 import com.google.protobuf.InvalidProtocolBufferException;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/65e2cfce/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
diff --git a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
index 4bf6e7e..d7cde2a 100644
+++ b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
@@ -44,11 +44,11 @@ import org.objectweb.asm.tree.ClassNode;
 import org.objectweb.asm.tree.FieldNode;
 import org.objectweb.asm.tree.MethodNode;
 
-import com.beust.jcommander.internal.Sets;
 import com.google.common.base.Preconditions;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
+import com.google.common.collect.Sets;
 import com.google.common.io.Files;
 import com.google.common.io.Resources;
 
@@ -112,15 +112,16 @@ public class ClassTransformer {
       String materializedClassName) throws ClassTransformationException {
 
     try {
-
+      long t0 = System.nanoTime();
       final byte[] implementationClass = classLoader.getClassByteCode(materializedClassName, entireClass);
 
       // Get Template Class
       final String templateClassName = templateDefinition.getTemplateClassName().replaceAll("\\.", File.separator);
       final String templateClassPath = File.separator + templateClassName + ".class";
+      long t1 = System.nanoTime();
       final byte[] templateClass = getClassByteCodeFromPath(templateClassPath);
-      int fileNum = new Random().nextInt(100);
-      Files.write(templateClass, new File(String.format("/tmp/%d-template.class", fileNum)));
+//      int fileNum = new Random().nextInt(100);
+      //Files.write(templateClass, new File(String.format("/tmp/%d-template.class", fileNum)));
       // Generate Merge Class
 
       // Setup adapters for merging, remapping cla