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

Switch to Threaded View
Drill, mail # dev - [04/24] git commit: Use PrelVisitor to add Project when Join has conflicting names from inputs. Move common code of MergeJoin, HashJoin to base class.


Copy link to this message
-
[04/24] git commit: Use PrelVisitor to add Project when Join has conflicting names from inputs. Move common code of MergeJoin, HashJoin to base class.
jacques@... 2014-05-22, 01:14
Use PrelVisitor to add Project when Join has conflicting names from inputs. Move common code of MergeJoin, HashJoin to base class.
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/73d3bd06
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/73d3bd06
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/73d3bd06

Branch: refs/heads/diagnostics2
Commit: 73d3bd063e2286cc1a71ebf7ef71ae6171bd592e
Parents: ebf3d34
Author: Jinfeng Ni <[EMAIL PROTECTED]>
Authored: Fri May 16 16:02:53 2014 -0700
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Mon May 19 09:11:22 2014 -0700

 .../exec/planner/logical/DrillProjectRel.java   |  6 +-
 .../exec/planner/physical/ExchangePrel.java     | 18 ++++
 .../exec/planner/physical/HashJoinPrel.java     | 64 +------------
 .../drill/exec/planner/physical/JoinPrel.java   | 98 ++++++++++++++++++++
 .../planner/physical/JoinPrelRenameVisitor.java | 75 +++++++++++++++
 .../exec/planner/physical/MergeJoinPrel.java    | 67 +------------
 .../exec/planner/physical/PrelVisitor.java      |  3 +
 .../physical/SelectionVectorPrelVisitor.java    |  5 +
 .../physical/SelectionVectorRemoverPrel.java    | 14 +++
 .../planner/physical/explain/PrelSequencer.java |  6 ++
 .../planner/sql/handlers/DefaultSqlHandler.java |  5 +
 .../apache/drill/exec/TestOpSerialization.java  | 18 ++++
 12 files changed, 250 insertions(+), 129 deletions(-)
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/73d3bd06/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillProjectRel.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillProjectRel.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillProjectRel.java
index aa75f52..c3eb3fb 100644
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillProjectRel.java
@@ -17,7 +17,6 @@
  */
 package org.apache.drill.exec.planner.logical;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.drill.common.logical.data.LogicalOperator;
@@ -28,10 +27,7 @@ import org.apache.drill.exec.planner.torel.ConversionContext;
 import org.eigenbase.rel.InvalidRelException;
 import org.eigenbase.rel.ProjectRelBase;
 import org.eigenbase.rel.RelNode;
-import org.eigenbase.rel.metadata.RelMetadataQuery;
 import org.eigenbase.relopt.RelOptCluster;
-import org.eigenbase.relopt.RelOptCost;
-import org.eigenbase.relopt.RelOptPlanner;
 import org.eigenbase.relopt.RelTraitSet;
 import org.eigenbase.reltype.RelDataType;
 import org.eigenbase.reltype.RelDataTypeField;
@@ -78,5 +74,5 @@ public class DrillProjectRel extends DrillProjectRelBase implements DrillRel {
     }
     return new DrillProjectRel(context.getCluster(), context.getLogicalTraits(), input, exps, new RelRecordType(fields));
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/73d3bd06/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/ExchangePrel.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/ExchangePrel.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/ExchangePrel.java
index 360fa80..21bf3b1 100644
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/ExchangePrel.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.drill.exec.planner.physical;
 
 import org.eigenbase.rel.RelNode;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/73d3bd06/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashJoinPrel.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashJoinPrel.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashJoinPrel.java
index 87da31e..b03ef62 100644
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashJoinPrel.java
@@ -18,16 +18,12 @@
 package org.apache.drill.exec.planner.physical;
 
 import java.io.IOException;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.drill.common.expression.FieldReference;
 import org.apache.drill.common.logical.data.JoinCondition;
-import org.apache.drill.common.logical.data.NamedExpression;
 import org.apache.drill.exec.physical.base.PhysicalOperator;
 import org.apache.drill.exec.physical.config.HashJoinPOP;
-import org.apache.drill.exec.physical.config.Project;
-import org.apache.drill.exec.planner.common.DrillJoinRelBase;
 import org.apache.drill.exec.planner.cost.DrillCostBase;
 import org.apache.drill.exec.planner.cost.DrillCostBase.DrillCostFactory;
 import org.apache.drill.exec.record.BatchSchema.SelectionVectorMode;
@@ -46,7 +42,7 @@ import org.eigenbase.util.Pair;
 
 import com.beust.jcommander.internal.Lists;
 
-public class HashJoinPrel  extends DrillJoinRelBase implements Prel {
+public class HashJoinPrel  extends JoinPrel {
 
   public HashJoinPrel(RelOptCluster cluster, RelTraitSet traits, RelNode left, RelNode right, RexNode condition,
       JoinRelType joinType) throws InvalidRelException {
@@ -94,8 +90,8 @@ public class HashJoinPrel  extends DrillJ