You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2012/09/27 19:19:10 UTC

svn commit: r1391108 [1/2] - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/optimizer/ java/org/apache/hadoop/hive/ql/plan/ java/org/apache/hadoop/hive/ql/ppd/ test/queries/clientpositive/ test/results/clientpositive/

Author: namit
Date: Thu Sep 27 17:19:08 2012
New Revision: 1391108

URL: http://svn.apache.org/viewvc?rev=1391108&view=rev
Log:
HIVE-3315 Propagates filters which are on the join condition transitively
(Navis via namit)


Added:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/PredicateTransitivePropagate.java
Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java
    hive/trunk/ql/src/test/queries/clientpositive/join_nullsafe.q
    hive/trunk/ql/src/test/results/clientpositive/auto_join11.q.out
    hive/trunk/ql/src/test/results/clientpositive/auto_join12.q.out
    hive/trunk/ql/src/test/results/clientpositive/auto_join13.q.out
    hive/trunk/ql/src/test/results/clientpositive/auto_join14.q.out
    hive/trunk/ql/src/test/results/clientpositive/auto_join16.q.out
    hive/trunk/ql/src/test/results/clientpositive/auto_join20.q.out
    hive/trunk/ql/src/test/results/clientpositive/auto_join27.q.out
    hive/trunk/ql/src/test/results/clientpositive/auto_join28.q.out
    hive/trunk/ql/src/test/results/clientpositive/auto_join29.q.out
    hive/trunk/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
    hive/trunk/ql/src/test/results/clientpositive/join11.q.out
    hive/trunk/ql/src/test/results/clientpositive/join12.q.out
    hive/trunk/ql/src/test/results/clientpositive/join13.q.out
    hive/trunk/ql/src/test/results/clientpositive/join14.q.out
    hive/trunk/ql/src/test/results/clientpositive/join16.q.out
    hive/trunk/ql/src/test/results/clientpositive/join20.q.out
    hive/trunk/ql/src/test/results/clientpositive/join40.q.out
    hive/trunk/ql/src/test/results/clientpositive/join_nullsafe.q.out
    hive/trunk/ql/src/test/results/clientpositive/mapjoin_filter_on_outerjoin.q.out
    hive/trunk/ql/src/test/results/clientpositive/ppd_gby_join.q.out
    hive/trunk/ql/src/test/results/clientpositive/ppd_join.q.out
    hive/trunk/ql/src/test/results/clientpositive/ppd_join2.q.out
    hive/trunk/ql/src/test/results/clientpositive/ppd_join3.q.out
    hive/trunk/ql/src/test/results/clientpositive/regex_col.q.out
    hive/trunk/ql/src/test/results/clientpositive/skewjoin.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java Thu Sep 27 17:19:08 2012
@@ -30,6 +30,7 @@ import org.apache.hadoop.hive.ql.optimiz
 import org.apache.hadoop.hive.ql.parse.ParseContext;
 import org.apache.hadoop.hive.ql.parse.SemanticException;
 import org.apache.hadoop.hive.ql.ppd.PredicatePushDown;
+import org.apache.hadoop.hive.ql.ppd.PredicateTransitivePropagate;
 
 /**
  * Implementation of the optimizer.
@@ -51,6 +52,7 @@ public class Optimizer {
       transformations.add(new ColumnPruner());
     }
     if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTPPD)) {
+      transformations.add(new PredicateTransitivePropagate());
       transformations.add(new PredicatePushDown());
       transformations.add(new PartitionPruner());
       transformations.add(new PartitionConditionRemover());

Added: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java?rev=1391108&view=auto
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java (added)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java Thu Sep 27 17:19:08 2012
@@ -0,0 +1,101 @@
+/**
+ * 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.hadoop.hive.ql.plan;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.hadoop.hive.ql.exec.FunctionRegistry;
+import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
+
+public class ExprNodeDescUtils {
+
+  public static int indexOf(ExprNodeDesc origin, List<ExprNodeDesc> sources) {
+    for (int i = 0; i < sources.size(); i++) {
+      if (origin.isSame(sources.get(i))) {
+        return i;
+      }
+    }
+    return -1;
+  }
+
+  // traversing origin, find ExprNodeDesc in sources and replaces it with ExprNodeDesc
+  // in targets having same index.
+  // return null if failed to find
+  public static ExprNodeDesc replace(ExprNodeDesc origin,
+      List<ExprNodeDesc> sources, List<ExprNodeDesc> targets) {
+    int index = indexOf(origin, sources);
+    if (index >= 0) {
+      return targets.get(index);
+    }
+    // encountered column or field which cannot be found in sources
+    if (origin instanceof ExprNodeColumnDesc || origin instanceof ExprNodeFieldDesc) {
+      return null;
+    }
+    // for ExprNodeGenericFuncDesc, it should be deterministic and stateless
+    if (origin instanceof ExprNodeGenericFuncDesc) {
+      ExprNodeGenericFuncDesc func = (ExprNodeGenericFuncDesc) origin;
+      if (!FunctionRegistry.isDeterministic(func.getGenericUDF())
+          || FunctionRegistry.isStateful(func.getGenericUDF())) {
+        return null;
+      }
+      List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>();
+      for (int i = 0; i < origin.getChildren().size(); i++) {
+        ExprNodeDesc child = replace(origin.getChildren().get(i), sources, targets);
+        if (child == null) {
+          return null;
+        }
+        children.add(child);
+      }
+      // duplicate function with possibily replaced children
+      ExprNodeGenericFuncDesc clone = (ExprNodeGenericFuncDesc) func.clone();
+      clone.setChildExprs(children);
+      return clone;
+    }
+    // constant or null, just return it
+    return origin;
+  }
+
+  /**
+   * return true if predicate is already included in source
+    */
+  public static boolean containsPredicate(ExprNodeDesc source, ExprNodeDesc predicate) {
+    if (source.isSame(predicate)) {
+      return true;
+    }
+    if (FunctionRegistry.isOpAnd(source)) {
+      if (containsPredicate(source.getChildren().get(0), predicate) ||
+          containsPredicate(source.getChildren().get(1), predicate)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * bind two predicates by AND op
+    */
+  public static ExprNodeDesc mergePredicates(ExprNodeDesc prev, ExprNodeDesc next) {
+    List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(2);
+    children.add(prev);
+    children.add(next);
+    return new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo,
+        FunctionRegistry.getGenericUDFForAnd(), children);
+  }
+}

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java Thu Sep 27 17:19:08 2012
@@ -53,6 +53,7 @@ import org.apache.hadoop.hive.ql.parse.R
 import org.apache.hadoop.hive.ql.parse.SemanticException;
 import org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc;
 import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
+import org.apache.hadoop.hive.ql.plan.ExprNodeDescUtils;
 import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc;
 import org.apache.hadoop.hive.ql.plan.FilterDesc;
 import org.apache.hadoop.hive.ql.plan.JoinCondDesc;
@@ -670,11 +671,10 @@ public final class OpProcFactory {
       }
 
       for (; i < preds.size(); i++) {
-        List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>(2);
-        children.add(condn);
-        children.add(preds.get(i));
-        condn = new ExprNodeGenericFuncDesc(TypeInfoFactory.booleanTypeInfo,
-            FunctionRegistry.getGenericUDFForAnd(), children);
+        ExprNodeDesc next = preds.get(i);
+        if (!ExprNodeDescUtils.containsPredicate(condn, next)) {
+          condn = ExprNodeDescUtils.mergePredicates(condn, next);
+        }
       }
     }
 

Added: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/PredicateTransitivePropagate.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/PredicateTransitivePropagate.java?rev=1391108&view=auto
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/PredicateTransitivePropagate.java (added)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/PredicateTransitivePropagate.java Thu Sep 27 17:19:08 2012
@@ -0,0 +1,273 @@
+/**
+ * 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.hadoop.hive.ql.ppd;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Stack;
+
+import org.apache.hadoop.hive.ql.exec.CommonJoinOperator;
+import org.apache.hadoop.hive.ql.exec.FilterOperator;
+import org.apache.hadoop.hive.ql.exec.JoinOperator;
+import org.apache.hadoop.hive.ql.exec.MapJoinOperator;
+import org.apache.hadoop.hive.ql.exec.Operator;
+import org.apache.hadoop.hive.ql.exec.OperatorFactory;
+import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator;
+import org.apache.hadoop.hive.ql.exec.RowSchema;
+import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher;
+import org.apache.hadoop.hive.ql.lib.Dispatcher;
+import org.apache.hadoop.hive.ql.lib.GraphWalker;
+import org.apache.hadoop.hive.ql.lib.Node;
+import org.apache.hadoop.hive.ql.lib.NodeProcessor;
+import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx;
+import org.apache.hadoop.hive.ql.lib.PreOrderWalker;
+import org.apache.hadoop.hive.ql.lib.Rule;
+import org.apache.hadoop.hive.ql.lib.RuleRegExp;
+import org.apache.hadoop.hive.ql.optimizer.Transform;
+import org.apache.hadoop.hive.ql.parse.OpParseContext;
+import org.apache.hadoop.hive.ql.parse.ParseContext;
+import org.apache.hadoop.hive.ql.parse.RowResolver;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
+import org.apache.hadoop.hive.ql.plan.ExprNodeDescUtils;
+import org.apache.hadoop.hive.ql.plan.FilterDesc;
+import org.apache.hadoop.hive.ql.plan.JoinCondDesc;
+import org.apache.hadoop.hive.ql.plan.JoinDesc;
+import org.apache.hadoop.hive.ql.plan.OperatorDesc;
+
+/**
+ * propagates filters to other aliases based on join condition
+ */
+public class PredicateTransitivePropagate implements Transform {
+
+  private ParseContext pGraphContext;
+
+  public ParseContext transform(ParseContext pctx) throws SemanticException {
+    pGraphContext = pctx;
+
+    Map<Rule, NodeProcessor> opRules = new LinkedHashMap<Rule, NodeProcessor>();
+    opRules.put(new RuleRegExp("R1",
+      "(" + FilterOperator.getOperatorName() + "%" +
+        ReduceSinkOperator.getOperatorName() + "%" +
+        JoinOperator.getOperatorName() + "%)|" +
+      "(" + FilterOperator.getOperatorName() + "%" +
+        ReduceSinkOperator.getOperatorName() + "%" +
+        MapJoinOperator.getOperatorName() + "%)")
+      , new JoinTransitive());
+
+    // The dispatcher fires the processor corresponding to the closest matching
+    // rule and passes the context along
+    TransitiveContext context = new TransitiveContext();
+    Dispatcher disp = new DefaultRuleDispatcher(null, opRules, context);
+    GraphWalker ogw = new PreOrderWalker(disp);
+
+    // Create a list of topop nodes
+    List<Node> topNodes = new ArrayList<Node>();
+    topNodes.addAll(pGraphContext.getTopOps().values());
+    ogw.startWalking(topNodes, null);
+
+    Map<ReduceSinkOperator, ExprNodeDesc> newFilters = context.getNewfilters();
+
+    // insert new filter between RS and parent of RS
+    for (Map.Entry<ReduceSinkOperator, ExprNodeDesc> entry : newFilters.entrySet()) {
+      ReduceSinkOperator reducer = entry.getKey();
+      Operator<?> parent = reducer.getParentOperators().get(0);
+
+      ExprNodeDesc expr = entry.getValue();
+      if (parent instanceof FilterOperator) {
+        ExprNodeDesc prev = ((FilterOperator)parent).getConf().getPredicate();
+        ExprNodeDesc merged = ExprNodeDescUtils.mergePredicates(prev, expr);
+        ((FilterOperator)parent).getConf().setPredicate(merged);
+      } else {
+        RowResolver parentRR = pGraphContext.getOpParseCtx().get(parent).getRowResolver();
+        Operator<FilterDesc> newFilter = createFilter(reducer, parent, parentRR, expr);
+        pGraphContext.getOpParseCtx().put(newFilter, new OpParseContext(parentRR));
+      }
+    }
+
+    return pGraphContext;
+  }
+
+  // insert filter operator between target(chilld) and input(parent)
+  private Operator<FilterDesc> createFilter(Operator<?> target, Operator<?> parent,
+      RowResolver parentRR, ExprNodeDesc filterExpr) {
+    Operator<FilterDesc> filter = OperatorFactory.get(new FilterDesc(filterExpr, false),
+        new RowSchema(parentRR.getColumnInfos()));
+    filter.setParentOperators(new ArrayList<Operator<? extends OperatorDesc>>());
+    filter.setChildOperators(new ArrayList<Operator<? extends OperatorDesc>>());
+    filter.getParentOperators().add(parent);
+    filter.getChildOperators().add(target);
+    parent.replaceChild(target, filter);
+    target.replaceParent(parent, filter);
+    return filter;
+  }
+
+  private static class TransitiveContext implements NodeProcessorCtx {
+
+    private final Map<CommonJoinOperator, int[][]> filterPropagates;
+    private final Map<ReduceSinkOperator, ExprNodeDesc> newFilters;
+
+    public TransitiveContext() {
+      filterPropagates = new HashMap<CommonJoinOperator, int[][]>();
+      newFilters = new HashMap<ReduceSinkOperator, ExprNodeDesc>();
+    }
+
+    public Map<CommonJoinOperator, int[][]> getFilterPropates() {
+      return filterPropagates;
+    }
+
+    public Map<ReduceSinkOperator, ExprNodeDesc> getNewfilters() {
+      return newFilters;
+    }
+  }
+
+  private static class JoinTransitive implements NodeProcessor {
+
+    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx,
+        Object... nodeOutputs) throws SemanticException {
+      @SuppressWarnings("unchecked")
+      CommonJoinOperator<JoinDesc> join = (CommonJoinOperator) nd;
+      ReduceSinkOperator source = (ReduceSinkOperator) stack.get(stack.size() - 2);
+      FilterOperator filter = (FilterOperator) stack.get(stack.size() - 3);
+      int srcPos = join.getParentOperators().indexOf(source);
+
+      TransitiveContext context = (TransitiveContext) procCtx;
+      Map<CommonJoinOperator, int[][]> filterPropagates = context.getFilterPropates();
+      Map<ReduceSinkOperator, ExprNodeDesc> newFilters = context.getNewfilters();
+
+      int[][] targets = filterPropagates.get(join);
+      if (targets == null) {
+        filterPropagates.put(join, targets = getTargets(join));
+      }
+
+      List<Operator<? extends OperatorDesc>> parents = join.getParentOperators();
+      for (int targetPos : targets[srcPos]) {
+        ReduceSinkOperator target = (ReduceSinkOperator) parents.get(targetPos);
+        List<ExprNodeDesc> sourceKeys = source.getConf().getKeyCols();
+        List<ExprNodeDesc> targetKeys = target.getConf().getKeyCols();
+
+        ExprNodeDesc predicate = filter.getConf().getPredicate();
+        ExprNodeDesc replaced = ExprNodeDescUtils.replace(predicate, sourceKeys, targetKeys);
+        if (replaced != null && !filterExists(target, replaced)) {
+          ExprNodeDesc prev = newFilters.get(target);
+          if (prev == null) {
+            newFilters.put(target, replaced);
+          } else {
+            newFilters.put(target, ExprNodeDescUtils.mergePredicates(prev, replaced));
+          }
+        }
+      }
+      return null;
+    }
+
+    // calculate filter propagation directions for each alias
+    // L<->R for innner/semi join, L->R for left outer join, R->L for right outer join
+    private int[][] getTargets(CommonJoinOperator<JoinDesc> join) {
+      JoinCondDesc[] conds = join.getConf().getConds();
+
+      int aliases = conds.length + 1;
+      Vectors vector = new Vectors(aliases);
+      for (JoinCondDesc cond : conds) {
+        int left = cond.getLeft();
+        int right = cond.getRight();
+        switch (cond.getType()) {
+          case JoinDesc.INNER_JOIN:
+          case JoinDesc.LEFT_SEMI_JOIN:
+            vector.add(left, right);
+            vector.add(right, left);
+            break;
+          case JoinDesc.LEFT_OUTER_JOIN:
+            vector.add(left, right);
+            break;
+          case JoinDesc.RIGHT_OUTER_JOIN:
+            vector.add(right, left);
+            break;
+          case JoinDesc.FULL_OUTER_JOIN:
+            break;
+        }
+      }
+      int[][] result = new int[aliases][];
+      for (int pos = 0 ; pos < aliases; pos++) {
+        // find all targets recursively
+        result[pos] = vector.traverse(pos);
+      }
+      return result;
+    }
+
+    // check same filter exists already
+    private boolean filterExists(ReduceSinkOperator target, ExprNodeDesc replaced) {
+      Operator<?> operator = target.getParentOperators().get(0);
+      for (; operator instanceof FilterOperator; operator = operator.getParentOperators().get(0)) {
+        ExprNodeDesc predicate = ((FilterOperator) operator).getConf().getPredicate();
+        if (ExprNodeDescUtils.containsPredicate(predicate, replaced)) {
+          return true;
+        }
+      }
+      return false;
+    }
+  }
+
+  private static class Vectors {
+
+    private Set<Integer>[] vector;
+
+    @SuppressWarnings("unchecked")
+    public Vectors(int length) {
+      vector = new Set[length];
+    }
+
+    public void add(int from, int to) {
+      if (vector[from] == null) {
+        vector[from] = new HashSet<Integer>();
+      }
+      vector[from].add(to);
+    }
+
+    public int[] traverse(int pos) {
+      Set<Integer> targets = new HashSet<Integer>();
+      traverse(targets, pos);
+      return toArray(targets);
+    }
+
+    private int[] toArray(Set<Integer> values) {
+      int index = 0;
+      int[] result = new int[values.size()];
+      for (int value : values) {
+        result[index++] = value;
+      }
+      return result;
+    }
+
+    private void traverse(Set<Integer> targets, int pos) {
+      if (vector[pos] == null) {
+        return;
+      }
+      for (int target : vector[pos]) {
+        if (targets.add(target)) {
+          traverse(targets, target);
+        }
+      }
+    }
+  }
+}

Modified: hive/trunk/ql/src/test/queries/clientpositive/join_nullsafe.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/join_nullsafe.q?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/join_nullsafe.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/join_nullsafe.q Thu Sep 27 17:19:08 2012
@@ -55,3 +55,7 @@ SELECT /*+ MAPJOIN(a) */ * FROM smb_inpu
 SELECT /*+ MAPJOIN(a) */ * FROM smb_input2 a RIGHT OUTER JOIN smb_input2 b ON a.value <=> b.value ORDER BY a.key, a.value, b.key, b.value;
 SELECT /*+ MAPJOIN(b) */ * FROM smb_input2 a JOIN smb_input2 b ON a.value <=> b.value ORDER BY a.key, a.value, b.key, b.value;
 SELECT /*+ MAPJOIN(b) */ * FROM smb_input2 a LEFT OUTER JOIN smb_input2 b ON a.value <=> b.value ORDER BY a.key, a.value, b.key, b.value;
+
+--HIVE-3315 join predicate transitive
+explain select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.key is NULL;
+select * from myinput1 a join myinput1 b on a.key<=>b.value AND a.key is NULL;

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join11.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join11.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join11.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join11.q.out Thu Sep 27 17:19:08 2012
@@ -41,22 +41,26 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              HashTable Sink Operator
-                condition expressions:
-                  0 {_col0}
-                  1 {_col1}
-                handleSkewJoin: false
-                keys:
-                  0 [Column[_col0]]
-                  1 [Column[_col0]]
-                Position of Big Table: 0
+            Filter Operator
+              predicate:
+                  expr: (key < 100.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                HashTable Sink Operator
+                  condition expressions:
+                    0 {_col0}
+                    1 {_col1}
+                  handleSkewJoin: false
+                  keys:
+                    0 [Column[_col0]]
+                    1 [Column[_col0]]
+                  Position of Big Table: 0
 
   Stage: Stage-4
     Map Reduce
@@ -171,44 +175,48 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                condition expressions:
-                  0 {_col0}
-                  1 {_col1}
-                handleSkewJoin: false
-                keys:
-                  0 [Column[_col0]]
-                  1 [Column[_col0]]
-                outputColumnNames: _col0, _col3
-                Position of Big Table: 1
-                Select Operator
-                  expressions:
-                        expr: _col0
-                        type: string
-                        expr: _col3
-                        type: string
+            Filter Operator
+              predicate:
+                  expr: (key < 100.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  condition expressions:
+                    0 {_col0}
+                    1 {_col1}
+                  handleSkewJoin: false
+                  keys:
+                    0 [Column[_col0]]
+                    1 [Column[_col0]]
                   outputColumnNames: _col0, _col3
-                  Group By Operator
-                    aggregations:
-                          expr: sum(hash(_col0,_col3))
-                    bucketGroup: false
-                    mode: hash
-                    outputColumnNames: _col0
-                    File Output Operator
-                      compressed: false
-                      GlobalTableId: 0
-                      table:
-                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  Position of Big Table: 1
+                  Select Operator
+                    expressions:
+                          expr: _col0
+                          type: string
+                          expr: _col3
+                          type: string
+                    outputColumnNames: _col0, _col3
+                    Group By Operator
+                      aggregations:
+                            expr: sum(hash(_col0,_col3))
+                      bucketGroup: false
+                      mode: hash
+                      outputColumnNames: _col0
+                      File Output Operator
+                        compressed: false
+                        GlobalTableId: 0
+                        table:
+                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
       Local Work:
         Map Reduce Local Work
 
@@ -242,25 +250,29 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Reduce Output Operator
-                key expressions:
-                      expr: _col0
-                      type: string
-                sort order: +
-                Map-reduce partition columns:
-                      expr: _col0
+            Filter Operator
+              predicate:
+                  expr: (key < 100.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
                       type: string
-                tag: 1
-                value expressions:
-                      expr: _col1
+                      expr: value
                       type: string
+                outputColumnNames: _col0, _col1
+                Reduce Output Operator
+                  key expressions:
+                        expr: _col0
+                        type: string
+                  sort order: +
+                  Map-reduce partition columns:
+                        expr: _col0
+                        type: string
+                  tag: 1
+                  value expressions:
+                        expr: _col1
+                        type: string
       Reduce Operator Tree:
         Join Operator
           condition map:

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join12.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join12.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join12.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join12.q.out Thu Sep 27 17:19:08 2012
@@ -52,30 +52,34 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              HashTable Sink Operator
-                condition expressions:
-                  0 {_col0}
-                  1 {_col1}
-                  2 
-                handleSkewJoin: false
-                keys:
-                  0 [Column[_col0]]
-                  1 [Column[_col0]]
-                  2 [Column[_col0]]
-                Position of Big Table: 0
+            Filter Operator
+              predicate:
+                  expr: ((key < 100.0) and (key < 80.0))
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                HashTable Sink Operator
+                  condition expressions:
+                    0 {_col0}
+                    1 {_col1}
+                    2 
+                  handleSkewJoin: false
+                  keys:
+                    0 [Column[_col0]]
+                    1 [Column[_col0]]
+                    2 [Column[_col0]]
+                  Position of Big Table: 0
         src3:src 
           TableScan
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 80.0)
+                  expr: ((key < 80.0) and (key < 100.0))
                   type: boolean
               Select Operator
                 expressions:
@@ -102,7 +106,7 @@ STAGE PLANS:
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 100.0)
+                  expr: ((key < 100.0) and (key < 80.0))
                   type: boolean
               Select Operator
                 expressions:
@@ -190,7 +194,7 @@ STAGE PLANS:
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 100.0)
+                  expr: ((key < 100.0) and (key < 80.0))
                   type: boolean
               Select Operator
                 expressions:
@@ -213,7 +217,7 @@ STAGE PLANS:
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 80.0)
+                  expr: ((key < 80.0) and (key < 100.0))
                   type: boolean
               Select Operator
                 expressions:
@@ -238,47 +242,51 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                     Inner Join 0 to 2
-                condition expressions:
-                  0 {_col0}
-                  1 {_col1}
-                  2 
-                handleSkewJoin: false
-                keys:
-                  0 [Column[_col0]]
-                  1 [Column[_col0]]
-                  2 [Column[_col0]]
-                outputColumnNames: _col0, _col3
-                Position of Big Table: 1
-                Select Operator
-                  expressions:
-                        expr: _col0
-                        type: string
-                        expr: _col3
-                        type: string
+            Filter Operator
+              predicate:
+                  expr: ((key < 100.0) and (key < 80.0))
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                       Inner Join 0 to 2
+                  condition expressions:
+                    0 {_col0}
+                    1 {_col1}
+                    2 
+                  handleSkewJoin: false
+                  keys:
+                    0 [Column[_col0]]
+                    1 [Column[_col0]]
+                    2 [Column[_col0]]
                   outputColumnNames: _col0, _col3
-                  Group By Operator
-                    aggregations:
-                          expr: sum(hash(_col0,_col3))
-                    bucketGroup: false
-                    mode: hash
-                    outputColumnNames: _col0
-                    File Output Operator
-                      compressed: false
-                      GlobalTableId: 0
-                      table:
-                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  Position of Big Table: 1
+                  Select Operator
+                    expressions:
+                          expr: _col0
+                          type: string
+                          expr: _col3
+                          type: string
+                    outputColumnNames: _col0, _col3
+                    Group By Operator
+                      aggregations:
+                            expr: sum(hash(_col0,_col3))
+                      bucketGroup: false
+                      mode: hash
+                      outputColumnNames: _col0
+                      File Output Operator
+                        compressed: false
+                        GlobalTableId: 0
+                        table:
+                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
       Local Work:
         Map Reduce Local Work
 
@@ -297,7 +305,7 @@ STAGE PLANS:
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 100.0)
+                  expr: ((key < 100.0) and (key < 80.0))
                   type: boolean
               Select Operator
                 expressions:
@@ -318,24 +326,28 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              HashTable Sink Operator
-                condition expressions:
-                  0 {_col0}
-                  1 {_col1}
-                  2 
-                handleSkewJoin: false
-                keys:
-                  0 [Column[_col0]]
-                  1 [Column[_col0]]
-                  2 [Column[_col0]]
-                Position of Big Table: 2
+            Filter Operator
+              predicate:
+                  expr: ((key < 100.0) and (key < 80.0))
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                HashTable Sink Operator
+                  condition expressions:
+                    0 {_col0}
+                    1 {_col1}
+                    2 
+                  handleSkewJoin: false
+                  keys:
+                    0 [Column[_col0]]
+                    1 [Column[_col0]]
+                    2 [Column[_col0]]
+                  Position of Big Table: 2
 
   Stage: Stage-7
     Map Reduce
@@ -345,7 +357,7 @@ STAGE PLANS:
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 80.0)
+                  expr: ((key < 80.0) and (key < 100.0))
                   type: boolean
               Select Operator
                 expressions:
@@ -397,7 +409,7 @@ STAGE PLANS:
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 100.0)
+                  expr: ((key < 100.0) and (key < 80.0))
                   type: boolean
               Select Operator
                 expressions:
@@ -419,31 +431,35 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Reduce Output Operator
-                key expressions:
-                      expr: _col0
-                      type: string
-                sort order: +
-                Map-reduce partition columns:
-                      expr: _col0
-                      type: string
-                tag: 1
-                value expressions:
-                      expr: _col1
+            Filter Operator
+              predicate:
+                  expr: ((key < 100.0) and (key < 80.0))
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
                       type: string
+                outputColumnNames: _col0, _col1
+                Reduce Output Operator
+                  key expressions:
+                        expr: _col0
+                        type: string
+                  sort order: +
+                  Map-reduce partition columns:
+                        expr: _col0
+                        type: string
+                  tag: 1
+                  value expressions:
+                        expr: _col1
+                        type: string
         src3:src 
           TableScan
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 80.0)
+                  expr: ((key < 80.0) and (key < 100.0))
                   type: boolean
               Select Operator
                 expressions:

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join13.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join13.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join13.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join13.q.out Thu Sep 27 17:19:08 2012
@@ -53,22 +53,26 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              HashTable Sink Operator
-                condition expressions:
-                  0 {_col0}
-                  1 {_col0} {_col1}
-                handleSkewJoin: false
-                keys:
-                  0 [Column[_col0]]
-                  1 [Column[_col0]]
-                Position of Big Table: 0
+            Filter Operator
+              predicate:
+                  expr: (key < 100.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                HashTable Sink Operator
+                  condition expressions:
+                    0 {_col0}
+                    1 {_col0} {_col1}
+                  handleSkewJoin: false
+                  keys:
+                    0 [Column[_col0]]
+                    1 [Column[_col0]]
+                  Position of Big Table: 0
 
   Stage: Stage-9
     Map Reduce
@@ -375,31 +379,35 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                condition expressions:
-                  0 {_col0}
-                  1 {_col0} {_col1}
-                handleSkewJoin: false
-                keys:
-                  0 [Column[_col0]]
-                  1 [Column[_col0]]
-                outputColumnNames: _col0, _col2, _col3
-                Position of Big Table: 1
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+            Filter Operator
+              predicate:
+                  expr: (key < 100.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                Map Join Operator
+                  condition map:
+                       Inner Join 0 to 1
+                  condition expressions:
+                    0 {_col0}
+                    1 {_col0} {_col1}
+                  handleSkewJoin: false
+                  keys:
+                    0 [Column[_col0]]
+                    1 [Column[_col0]]
+                  outputColumnNames: _col0, _col2, _col3
+                  Position of Big Table: 1
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+                    table:
+                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
       Local Work:
         Map Reduce Local Work
 
@@ -433,27 +441,31 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Reduce Output Operator
-                key expressions:
-                      expr: _col0
-                      type: string
-                sort order: +
-                Map-reduce partition columns:
-                      expr: _col0
-                      type: string
-                tag: 1
-                value expressions:
-                      expr: _col0
+            Filter Operator
+              predicate:
+                  expr: (key < 100.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
                       type: string
-                      expr: _col1
+                      expr: value
                       type: string
+                outputColumnNames: _col0, _col1
+                Reduce Output Operator
+                  key expressions:
+                        expr: _col0
+                        type: string
+                  sort order: +
+                  Map-reduce partition columns:
+                        expr: _col0
+                        type: string
+                  tag: 1
+                  value expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: string
       Reduce Operator Tree:
         Join Operator
           condition map:

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join14.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join14.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join14.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join14.q.out Thu Sep 27 17:19:08 2012
@@ -38,15 +38,19 @@ STAGE PLANS:
         srcpart 
           TableScan
             alias: srcpart
-            HashTable Sink Operator
-              condition expressions:
-                0 {key}
-                1 {value}
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              Position of Big Table: 0
+            Filter Operator
+              predicate:
+                  expr: (key > 100.0)
+                  type: boolean
+              HashTable Sink Operator
+                condition expressions:
+                  0 {key}
+                  1 {value}
+                handleSkewJoin: false
+                keys:
+                  0 [Column[key]]
+                  1 [Column[key]]
+                Position of Big Table: 0
 
   Stage: Stage-4
     Map Reduce
@@ -138,40 +142,44 @@ STAGE PLANS:
         srcpart 
           TableScan
             alias: srcpart
-            Map Join Operator
-              condition map:
-                   Inner Join 0 to 1
-              condition expressions:
-                0 {key}
-                1 {value}
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-              outputColumnNames: _col0, _col5
-              Position of Big Table: 1
-              Select Operator
-                expressions:
-                      expr: _col0
-                      type: string
-                      expr: _col5
-                      type: string
-                outputColumnNames: _col0, _col1
+            Filter Operator
+              predicate:
+                  expr: (key > 100.0)
+                  type: boolean
+              Map Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                condition expressions:
+                  0 {key}
+                  1 {value}
+                handleSkewJoin: false
+                keys:
+                  0 [Column[key]]
+                  1 [Column[key]]
+                outputColumnNames: _col0, _col5
+                Position of Big Table: 1
                 Select Operator
                   expressions:
-                        expr: UDFToInteger(_col0)
-                        type: int
-                        expr: _col1
+                        expr: _col0
+                        type: string
+                        expr: _col5
                         type: string
                   outputColumnNames: _col0, _col1
-                  File Output Operator
-                    compressed: false
-                    GlobalTableId: 1
-                    table:
-                        input format: org.apache.hadoop.mapred.TextInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                        name: default.dest1
+                  Select Operator
+                    expressions:
+                          expr: UDFToInteger(_col0)
+                          type: int
+                          expr: _col1
+                          type: string
+                    outputColumnNames: _col0, _col1
+                    File Output Operator
+                      compressed: false
+                      GlobalTableId: 1
+                      table:
+                          input format: org.apache.hadoop.mapred.TextInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                          name: default.dest1
       Local Work:
         Map Reduce Local Work
 
@@ -200,18 +208,22 @@ STAGE PLANS:
         srcpart 
           TableScan
             alias: srcpart
-            Reduce Output Operator
-              key expressions:
-                    expr: key
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: key
-                    type: string
-              tag: 1
-              value expressions:
-                    expr: value
-                    type: string
+            Filter Operator
+              predicate:
+                  expr: (key > 100.0)
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 1
+                value expressions:
+                      expr: value
+                      type: string
       Reduce Operator Tree:
         Join Operator
           condition map:

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join16.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join16.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join16.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join16.q.out Thu Sep 27 17:19:08 2012
@@ -43,7 +43,7 @@ STAGE PLANS:
             alias: tab
             Filter Operator
               predicate:
-                  expr: (value < 200.0)
+                  expr: ((key > 20.0) and (value < 200.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -174,7 +174,7 @@ STAGE PLANS:
             alias: tab
             Filter Operator
               predicate:
-                  expr: (value < 200.0)
+                  expr: ((key > 20.0) and (value < 200.0))
                   type: boolean
               Map Join Operator
                 condition map:
@@ -248,7 +248,7 @@ STAGE PLANS:
             alias: tab
             Filter Operator
               predicate:
-                  expr: (value < 200.0)
+                  expr: ((key > 20.0) and (value < 200.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join20.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join20.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join20.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join20.q.out Thu Sep 27 17:19:08 2012
@@ -65,21 +65,25 @@ STAGE PLANS:
         a:src2 
           TableScan
             alias: src2
-            HashTable Sink Operator
-              condition expressions:
-                0 {key} {value}
-                1 {key} {value}
-                2 {key} {value}
-              filter predicates:
-                0 
-                1 
-                2 {(key < 20.0)}
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-                2 [Column[key]]
-              Position of Big Table: 2
+            Filter Operator
+              predicate:
+                  expr: (key < 10.0)
+                  type: boolean
+              HashTable Sink Operator
+                condition expressions:
+                  0 {key} {value}
+                  1 {key} {value}
+                  2 {key} {value}
+                filter predicates:
+                  0 
+                  1 
+                  2 {(key < 20.0)}
+                handleSkewJoin: false
+                keys:
+                  0 [Column[key]]
+                  1 [Column[key]]
+                  2 [Column[key]]
+                Position of Big Table: 2
 
   Stage: Stage-6
     Map Reduce
@@ -249,20 +253,24 @@ STAGE PLANS:
         a:src2 
           TableScan
             alias: src2
-            Reduce Output Operator
-              key expressions:
-                    expr: key
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: key
-                    type: string
-              tag: 1
-              value expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
+            Filter Operator
+              predicate:
+                  expr: (key < 10.0)
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 1
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
         a:src3 
           TableScan
             alias: src3
@@ -388,7 +396,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key < 15.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -410,7 +418,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key < 15.0)
+                  expr: ((key < 15.0) and (key < 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -577,7 +585,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key < 15.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -598,7 +606,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key < 15.0)
+                  expr: ((key < 15.0) and (key < 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join27.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join27.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join27.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join27.q.out Thu Sep 27 17:19:08 2012
@@ -43,35 +43,39 @@ STAGE PLANS:
         null-subquery2:src_12-subquery2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: key, value
-              Group By Operator
-                bucketGroup: false
-                keys:
+            Filter Operator
+              predicate:
+                  expr: (key < 200.0)
+                  type: boolean
+              Select Operator
+                expressions:
                       expr: key
                       type: string
                       expr: value
                       type: string
-                mode: hash
-                outputColumnNames: _col0, _col1
-                Reduce Output Operator
-                  key expressions:
-                        expr: _col0
-                        type: string
-                        expr: _col1
-                        type: string
-                  sort order: ++
-                  Map-reduce partition columns:
-                        expr: _col0
+                outputColumnNames: key, value
+                Group By Operator
+                  bucketGroup: false
+                  keys:
+                        expr: key
                         type: string
-                        expr: _col1
+                        expr: value
                         type: string
-                  tag: -1
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                          expr: _col1
+                          type: string
+                    sort order: ++
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                          expr: _col1
+                          type: string
+                    tag: -1
       Reduce Operator Tree:
         Group By Operator
           bucketGroup: false
@@ -161,38 +165,42 @@ STAGE PLANS:
         null-subquery1:src_12-subquery1:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Union
-                Map Join Operator
-                  condition map:
-                       Inner Join 0 to 1
-                  condition expressions:
-                    0 
-                    1 
-                  handleSkewJoin: false
-                  keys:
-                    0 [Column[_col0]]
-                    1 [Column[_col0]]
-                  Position of Big Table: 0
-                  Select Operator
-                    Group By Operator
-                      aggregations:
-                            expr: count(1)
-                      bucketGroup: false
-                      mode: hash
-                      outputColumnNames: _col0
-                      File Output Operator
-                        compressed: false
-                        GlobalTableId: 0
-                        table:
-                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+            Filter Operator
+              predicate:
+                  expr: (key < 200.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                Union
+                  Map Join Operator
+                    condition map:
+                         Inner Join 0 to 1
+                    condition expressions:
+                      0 
+                      1 
+                    handleSkewJoin: false
+                    keys:
+                      0 [Column[_col0]]
+                      1 [Column[_col0]]
+                    Position of Big Table: 0
+                    Select Operator
+                      Group By Operator
+                        aggregations:
+                              expr: count(1)
+                        bucketGroup: false
+                        mode: hash
+                        outputColumnNames: _col0
+                        File Output Operator
+                          compressed: false
+                          GlobalTableId: 0
+                          table:
+                              input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                              output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
       Local Work:
         Map Reduce Local Work
 
@@ -250,23 +258,27 @@ STAGE PLANS:
         null-subquery1:src_12-subquery1:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Union
-                HashTable Sink Operator
-                  condition expressions:
-                    0 
-                    1 
-                  handleSkewJoin: false
-                  keys:
-                    0 [Column[_col0]]
-                    1 [Column[_col0]]
-                  Position of Big Table: 1
+            Filter Operator
+              predicate:
+                  expr: (key < 200.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                Union
+                  HashTable Sink Operator
+                    condition expressions:
+                      0 
+                      1 
+                    handleSkewJoin: false
+                    keys:
+                      0 [Column[_col0]]
+                      1 [Column[_col0]]
+                    Position of Big Table: 1
 
   Stage: Stage-7
     Map Reduce
@@ -328,23 +340,27 @@ STAGE PLANS:
         null-subquery1:src_12-subquery1:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Union
-                Reduce Output Operator
-                  key expressions:
-                        expr: _col0
-                        type: string
-                  sort order: +
-                  Map-reduce partition columns:
-                        expr: _col0
-                        type: string
-                  tag: 0
+            Filter Operator
+              predicate:
+                  expr: (key < 200.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
+                outputColumnNames: _col0, _col1
+                Union
+                  Reduce Output Operator
+                    key expressions:
+                          expr: _col0
+                          type: string
+                    sort order: +
+                    Map-reduce partition columns:
+                          expr: _col0
+                          type: string
+                    tag: 0
         src3:src 
           TableScan
             alias: src

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join28.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join28.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join28.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join28.q.out Thu Sep 27 17:19:08 2012
@@ -224,7 +224,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:

Modified: hive/trunk/ql/src/test/results/clientpositive/auto_join29.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/auto_join29.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/auto_join29.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/auto_join29.q.out Thu Sep 27 17:19:08 2012
@@ -2933,7 +2933,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -3088,7 +3088,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -3157,12 +3157,6 @@ POSTHOOK: Input: default@src
 0	val_0	NULL	NULL	NULL	NULL
 0	val_0	NULL	NULL	NULL	NULL
 0	val_0	NULL	NULL	NULL	NULL
-0	val_0	NULL	NULL	NULL	NULL
-0	val_0	NULL	NULL	NULL	NULL
-0	val_0	NULL	NULL	NULL	NULL
-0	val_0	NULL	NULL	NULL	NULL
-0	val_0	NULL	NULL	NULL	NULL
-0	val_0	NULL	NULL	NULL	NULL
 10	val_10	NULL	NULL	NULL	NULL
 100	val_100	NULL	NULL	NULL	NULL
 100	val_100	NULL	NULL	NULL	NULL
@@ -4099,12 +4093,6 @@ POSTHOOK: Input: default@src
 5	val_5	NULL	NULL	NULL	NULL
 5	val_5	NULL	NULL	NULL	NULL
 5	val_5	NULL	NULL	NULL	NULL
-5	val_5	NULL	NULL	NULL	NULL
-5	val_5	NULL	NULL	NULL	NULL
-5	val_5	NULL	NULL	NULL	NULL
-5	val_5	NULL	NULL	NULL	NULL
-5	val_5	NULL	NULL	NULL	NULL
-5	val_5	NULL	NULL	NULL	NULL
 51	val_51	NULL	NULL	NULL	NULL
 51	val_51	NULL	NULL	NULL	NULL
 51	val_51	NULL	NULL	NULL	NULL
@@ -6382,7 +6370,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -6400,7 +6388,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -6422,7 +6410,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Map Join Operator
                 condition map:
@@ -6520,7 +6508,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -6538,7 +6526,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -6560,7 +6548,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               Map Join Operator
                 condition map:
@@ -6609,7 +6597,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -6630,7 +6618,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -6651,7 +6639,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -6749,7 +6737,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -6771,7 +6759,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -6888,7 +6876,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -6909,7 +6897,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -7528,7 +7516,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -7550,7 +7538,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -7684,7 +7672,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -7705,7 +7693,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -7855,46 +7843,50 @@ STAGE PLANS:
         src2 
           TableScan
             alias: src2
-            Map Join Operator
-              condition map:
-                   Right Outer Join0 to 1
-                   Inner Join 1 to 2
-              condition expressions:
-                0 {key} {value}
-                1 {key} {value}
-                2 {key} {value}
-              filter predicates:
-                0 
-                1 {(key > 10.0)}
-                2 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-                2 [Column[key]]
-              outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9
-              Position of Big Table: 1
-              Select Operator
-                expressions:
-                      expr: _col0
-                      type: string
-                      expr: _col1
-                      type: string
-                      expr: _col4
-                      type: string
-                      expr: _col5
-                      type: string
-                      expr: _col8
-                      type: string
-                      expr: _col9
-                      type: string
-                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                File Output Operator
-                  compressed: false
-                  GlobalTableId: 0
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+            Filter Operator
+              predicate:
+                  expr: (key < 10.0)
+                  type: boolean
+              Map Join Operator
+                condition map:
+                     Right Outer Join0 to 1
+                     Inner Join 1 to 2
+                condition expressions:
+                  0 {key} {value}
+                  1 {key} {value}
+                  2 {key} {value}
+                filter predicates:
+                  0 
+                  1 {(key > 10.0)}
+                  2 
+                handleSkewJoin: false
+                keys:
+                  0 [Column[key]]
+                  1 [Column[key]]
+                  2 [Column[key]]
+                outputColumnNames: _col0, _col1, _col4, _col5, _col8, _col9
+                Position of Big Table: 1
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: string
+                        expr: _col4
+                        type: string
+                        expr: _col5
+                        type: string
+                        expr: _col8
+                        type: string
+                        expr: _col9
+                        type: string
+                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+                    table:
+                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
       Local Work:
         Map Reduce Local Work
 
@@ -7975,21 +7967,25 @@ STAGE PLANS:
         src2 
           TableScan
             alias: src2
-            HashTable Sink Operator
-              condition expressions:
-                0 {key} {value}
-                1 {key} {value}
-                2 {key} {value}
-              filter predicates:
-                0 
-                1 {(key > 10.0)}
-                2 
-              handleSkewJoin: false
-              keys:
-                0 [Column[key]]
-                1 [Column[key]]
-                2 [Column[key]]
-              Position of Big Table: 2
+            Filter Operator
+              predicate:
+                  expr: (key < 10.0)
+                  type: boolean
+              HashTable Sink Operator
+                condition expressions:
+                  0 {key} {value}
+                  1 {key} {value}
+                  2 {key} {value}
+                filter predicates:
+                  0 
+                  1 {(key > 10.0)}
+                  2 
+                handleSkewJoin: false
+                keys:
+                  0 [Column[key]]
+                  1 [Column[key]]
+                  2 [Column[key]]
+                Position of Big Table: 2
 
   Stage: Stage-6
     Map Reduce
@@ -8071,20 +8067,24 @@ STAGE PLANS:
         src2 
           TableScan
             alias: src2
-            Reduce Output Operator
-              key expressions:
-                    expr: key
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: key
-                    type: string
-              tag: 1
-              value expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
+            Filter Operator
+              predicate:
+                  expr: (key < 10.0)
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: key
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: key
+                      type: string
+                tag: 1
+                value expressions:
+                      expr: key
+                      type: string
+                      expr: value
+                      type: string
         src3 
           TableScan
             alias: src3
@@ -8254,7 +8254,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -8272,7 +8272,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -8294,7 +8294,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Map Join Operator
                 condition map:
@@ -8392,7 +8392,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -8410,7 +8410,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -8432,7 +8432,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               Map Join Operator
                 condition map:
@@ -8488,7 +8488,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -8506,7 +8506,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               HashTable Sink Operator
                 condition expressions:
@@ -8528,7 +8528,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Map Join Operator
                 condition map:
@@ -8577,7 +8577,7 @@ STAGE PLANS:
             alias: src1
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -8598,7 +8598,7 @@ STAGE PLANS:
             alias: src2
             Filter Operator
               predicate:
-                  expr: (key > 10.0)
+                  expr: ((key > 10.0) and (key < 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -8619,7 +8619,7 @@ STAGE PLANS:
             alias: src3
             Filter Operator
               predicate:
-                  expr: (key < 10.0)
+                  expr: ((key < 10.0) and (key > 10.0))
                   type: boolean
               Reduce Output Operator
                 key expressions:

Modified: hive/trunk/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/filter_join_breaktask.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/filter_join_breaktask.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/filter_join_breaktask.q.out Thu Sep 27 17:19:08 2012
@@ -67,7 +67,7 @@ STAGE PLANS:
             Filter Operator
               isSamplingPred: false
               predicate:
-                  expr: (value is not null and (value <> ''))
+                  expr: ((key is not null and value is not null) and (value <> ''))
                   type: boolean
               Reduce Output Operator
                 key expressions:
@@ -178,18 +178,23 @@ STAGE PLANS:
           TableScan
             alias: g
             GatherStats: false
-            Reduce Output Operator
-              key expressions:
-                    expr: value
-                    type: string
-              sort order: +
-              Map-reduce partition columns:
-                    expr: value
-                    type: string
-              tag: 1
-              value expressions:
-                    expr: value
-                    type: string
+            Filter Operator
+              isSamplingPred: false
+              predicate:
+                  expr: (value <> '')
+                  type: boolean
+              Reduce Output Operator
+                key expressions:
+                      expr: value
+                      type: string
+                sort order: +
+                Map-reduce partition columns:
+                      expr: value
+                      type: string
+                tag: 1
+                value expressions:
+                      expr: value
+                      type: string
       Needs Tagging: true
       Path -> Alias:
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/join11.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join11.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join11.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join11.q.out Thu Sep 27 17:19:08 2012
@@ -52,25 +52,29 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Reduce Output Operator
-                key expressions:
-                      expr: _col0
+            Filter Operator
+              predicate:
+                  expr: (key < 100.0)
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
                       type: string
-                sort order: +
-                Map-reduce partition columns:
-                      expr: _col0
-                      type: string
-                tag: 1
-                value expressions:
-                      expr: _col1
+                      expr: value
                       type: string
+                outputColumnNames: _col0, _col1
+                Reduce Output Operator
+                  key expressions:
+                        expr: _col0
+                        type: string
+                  sort order: +
+                  Map-reduce partition columns:
+                        expr: _col0
+                        type: string
+                  tag: 1
+                  value expressions:
+                        expr: _col1
+                        type: string
       Reduce Operator Tree:
         Join Operator
           condition map:

Modified: hive/trunk/ql/src/test/results/clientpositive/join12.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/join12.q.out?rev=1391108&r1=1391107&r2=1391108&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/join12.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/join12.q.out Thu Sep 27 17:19:08 2012
@@ -36,7 +36,7 @@ STAGE PLANS:
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 100.0)
+                  expr: ((key < 100.0) and (key < 80.0))
                   type: boolean
               Select Operator
                 expressions:
@@ -58,31 +58,35 @@ STAGE PLANS:
         src2:src 
           TableScan
             alias: src
-            Select Operator
-              expressions:
-                    expr: key
-                    type: string
-                    expr: value
-                    type: string
-              outputColumnNames: _col0, _col1
-              Reduce Output Operator
-                key expressions:
-                      expr: _col0
-                      type: string
-                sort order: +
-                Map-reduce partition columns:
-                      expr: _col0
+            Filter Operator
+              predicate:
+                  expr: ((key < 100.0) and (key < 80.0))
+                  type: boolean
+              Select Operator
+                expressions:
+                      expr: key
                       type: string
-                tag: 1
-                value expressions:
-                      expr: _col1
+                      expr: value
                       type: string
+                outputColumnNames: _col0, _col1
+                Reduce Output Operator
+                  key expressions:
+                        expr: _col0
+                        type: string
+                  sort order: +
+                  Map-reduce partition columns:
+                        expr: _col0
+                        type: string
+                  tag: 1
+                  value expressions:
+                        expr: _col1
+                        type: string
         src3:src 
           TableScan
             alias: src
             Filter Operator
               predicate:
-                  expr: (key < 80.0)
+                  expr: ((key < 80.0) and (key < 100.0))
                   type: boolean
               Select Operator
                 expressions: