hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject [50/50] [abbrv] hive git commit: HIVE-13815: Improve logic to infer false predicates (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Date Tue, 28 Mar 2017 21:10:07 GMT
HIVE-13815: Improve logic to infer false predicates (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)

Conflicts:
	ql/src/test/results/clientpositive/lineage3.q.out
	ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out

Change-Id: I0727a4681836aedd422fde69b6e32d78069dfa68


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/ab3af5b0
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ab3af5b0
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ab3af5b0

Branch: refs/heads/branch-2.2
Commit: ab3af5b020faa39eba65c786e475d080f184c64a
Parents: 1de9271
Author: Jesus Camacho Rodriguez <jcamacho@apache.org>
Authored: Thu Jul 21 20:44:45 2016 +0100
Committer: Owen O'Malley <omalley@apache.org>
Committed: Tue Mar 28 14:03:11 2017 -0700

----------------------------------------------------------------------
 .../test/results/positive/hbase_pushdown.q.out  |   4 +-
 .../rules/HiveReduceExpressionsRule.java        | 120 +++++++++++++----
 .../clientpositive/annotate_stats_filter.q.out  |   4 +-
 .../clientpositive/annotate_stats_part.q.out    |   6 +-
 .../results/clientpositive/cbo_rp_join1.q.out   |  26 ++--
 .../results/clientpositive/constprog2.q.out     |   2 +-
 .../clientpositive/constprog_partitioner.q.out  |   2 +-
 .../clientpositive/constprog_semijoin.q.out     | 128 +++++++++----------
 ql/src/test/results/clientpositive/cte_5.q.out  |  40 +++---
 .../clientpositive/filter_cond_pushdown.q.out   |  60 ++++-----
 ql/src/test/results/clientpositive/join42.q.out |   4 +-
 .../results/clientpositive/llap/cte_5.q.out     |  40 +++---
 .../llap/dynamic_partition_pruning_2.q.out      |   4 +-
 .../llap/hybridgrace_hashjoin_1.q.out           |   4 +-
 .../clientpositive/llap/tez_self_join.q.out     |   2 +-
 .../test/results/clientpositive/mapjoin2.q.out  |   3 +
 .../test/results/clientpositive/mergejoin.q.out |  13 ++
 .../clientpositive/ppd_outer_join5.q.out        |   4 +-
 .../results/clientpositive/ppd_udf_case.q.out   |   4 +-
 .../results/clientpositive/ppd_union_view.q.out |   2 +-
 .../results/clientpositive/smb_mapjoin_25.q.out |   8 +-
 .../spark/constprog_partitioner.q.out           |   5 +
 .../spark/constprog_semijoin.q.out              | 128 +++++++++----------
 .../clientpositive/spark/ppd_outer_join5.q.out  |   4 +-
 .../clientpositive/spark/smb_mapjoin_25.q.out   |   8 +-
 .../clientpositive/tez/constprog_semijoin.q.out |  88 ++++++-------
 .../test/results/clientpositive/tez/cte_5.q.out |  39 +++---
 .../tez/dynamic_partition_pruning_2.q.out       |   4 +-
 .../tez/hybridgrace_hashjoin_1.q.out            |   4 +-
 .../results/clientpositive/tez/mapjoin2.q.out   |   3 +
 .../results/clientpositive/tez/mergejoin.q.out  |  15 ++-
 .../clientpositive/tez/tez_self_join.q.out      |   2 +-
 32 files changed, 441 insertions(+), 339 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/hbase-handler/src/test/results/positive/hbase_pushdown.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_pushdown.q.out b/hbase-handler/src/test/results/positive/hbase_pushdown.q.out
index b94d8ad..5fac123 100644
--- a/hbase-handler/src/test/results/positive/hbase_pushdown.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_pushdown.q.out
@@ -202,10 +202,10 @@ STAGE PLANS:
             alias: hbase_pushdown
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Filter Operator
-              predicate: (((key = 80) and (key = 90)) and (value like '%90%')) (type: boolean)
+              predicate: false (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
-                expressions: 90 (type: int), value (type: string)
+                expressions: key (type: int), value (type: string)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                 File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsRule.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsRule.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsRule.java
index 6efc731..54ec4be 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsRule.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsRule.java
@@ -22,6 +22,7 @@ import org.apache.calcite.plan.RelOptPredicateList;
 import org.apache.calcite.plan.RelOptRuleCall;
 import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.rel.core.Filter;
+import org.apache.calcite.rel.core.Project;
 import org.apache.calcite.rel.metadata.RelMetadataQuery;
 import org.apache.calcite.rel.rules.ReduceExpressionsRule;
 import org.apache.calcite.rex.RexCall;
@@ -63,7 +64,7 @@ public abstract class HiveReduceExpressionsRule extends ReduceExpressionsRule {
    * {@link org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveFilter}.
    */
   public static final ReduceExpressionsRule FILTER_INSTANCE =
-          new FilterReduceExpressionsRule(HiveFilter.class, HiveRelFactories.HIVE_BUILDER);
+      new FilterReduceExpressionsRule(HiveFilter.class, HiveRelFactories.HIVE_BUILDER);
 
   /**
    * Singleton rule that reduces constants inside a
@@ -79,18 +80,6 @@ public abstract class HiveReduceExpressionsRule extends ReduceExpressionsRule {
   public static final ReduceExpressionsRule JOIN_INSTANCE =
       new JoinReduceExpressionsRule(HiveJoin.class, HiveRelFactories.HIVE_BUILDER);
 
-  //~ Constructors -----------------------------------------------------------
-
-  /**
-   * Creates a HiveReduceExpressionsRule.
-   *
-   * @param clazz class of rels to which this rule should apply
-   */
-  protected HiveReduceExpressionsRule(Class<? extends RelNode> clazz,
-      RelBuilderFactory relBuilderFactory, String desc) {
-    super(clazz, relBuilderFactory, desc);
-  }
-
   /**
    * Rule that reduces constants inside a {@link org.apache.calcite.rel.core.Filter}.
    * If the condition is a constant, the filter is removed (if TRUE) or replaced with
@@ -99,11 +88,12 @@ public abstract class HiveReduceExpressionsRule extends ReduceExpressionsRule {
   public static class FilterReduceExpressionsRule extends ReduceExpressionsRule {
 
     public FilterReduceExpressionsRule(Class<? extends Filter> filterClass,
-        RelBuilderFactory relBuilderFactory) {
+                                       RelBuilderFactory relBuilderFactory) {
       super(filterClass, relBuilderFactory, "ReduceExpressionsRule(Filter)");
     }
 
-    @Override public void onMatch(RelOptRuleCall call) {
+    @Override
+    public void onMatch(RelOptRuleCall call) {
       final Filter filter = call.rel(0);
       final List<RexNode> expList =
           Lists.newArrayList(filter.getCondition());
@@ -141,7 +131,7 @@ public abstract class HiveReduceExpressionsRule extends ReduceExpressionsRule {
         // e.g condition(null = null) is reduced to condition (null) with null type
         // since this is a condition which will always be boolean type we cast it to
         // boolean type
-        if(newConditionExp.getType().getSqlTypeName() == SqlTypeName.NULL) {
+        if (newConditionExp.getType().getSqlTypeName() == SqlTypeName.NULL) {
           newConditionExp = call.builder().cast(newConditionExp, SqlTypeName.BOOLEAN);
         }
         call.transformTo(call.builder().
@@ -198,15 +188,15 @@ public abstract class HiveReduceExpressionsRule extends ReduceExpressionsRule {
       // it with an Empty.
       boolean alwaysTrue;
       switch (rexCall.getKind()) {
-      case IS_NULL:
-      case IS_UNKNOWN:
-        alwaysTrue = false;
-        break;
-      case IS_NOT_NULL:
-        alwaysTrue = true;
-        break;
-      default:
-        return;
+        case IS_NULL:
+        case IS_UNKNOWN:
+          alwaysTrue = false;
+          break;
+        case IS_NOT_NULL:
+          alwaysTrue = true;
+          break;
+        default:
+          return;
       }
       if (reverse) {
         alwaysTrue = !alwaysTrue;
@@ -225,6 +215,86 @@ public abstract class HiveReduceExpressionsRule extends ReduceExpressionsRule {
     }
   }
 
+
+  /**
+   * Rule that reduces constants inside a {@link org.apache.calcite.rel.core.Project}.
+   */
+  public static class ProjectReduceExpressionsRule extends HiveReduceExpressionsRule {
+
+    public ProjectReduceExpressionsRule(Class<? extends Project> projectClass,
+                                        RelBuilderFactory relBuilderFactory) {
+      super(projectClass, relBuilderFactory, "HiveReduceExpressionsRule(Project)");
+    }
+
+    @Override
+    public void onMatch(RelOptRuleCall call) {
+      Project project = call.rel(0);
+      final RelOptPredicateList predicates =
+          RelMetadataQuery.instance().getPulledUpPredicates(project.getInput());
+      final List<RexNode> expList =
+          Lists.newArrayList(project.getProjects());
+      if (reduceExpressions(project, expList, predicates)) {
+        RelNode newProject = call.builder().push(project.getInput())
+            .project(expList, project.getRowType().getFieldNames()).build();
+        call.transformTo(newProject);
+
+        // New plan is absolutely better than old plan.
+        call.getPlanner().setImportance(project, 0.0);
+      }
+    }
+  }
+
+  /**
+   * Rule that reduces constants inside a {@link org.apache.calcite.rel.core.HiveJoin}.
+   */
+  public static class JoinReduceExpressionsRule extends HiveReduceExpressionsRule {
+
+    public JoinReduceExpressionsRule(Class<? extends HiveJoin> joinClass,
+                                     RelBuilderFactory relBuilderFactory) {
+      super(joinClass, relBuilderFactory, "HiveReduceExpressionsRule(HiveJoin)");
+    }
+
+    @Override
+    public void onMatch(RelOptRuleCall call) {
+      final HiveJoin join = call.rel(0);
+      final List<RexNode> expList = Lists.newArrayList(join.getCondition());
+      final int fieldCount = join.getLeft().getRowType().getFieldCount();
+      RelMetadataQuery mq = RelMetadataQuery.instance();
+      final RelOptPredicateList leftPredicates =
+          mq.getPulledUpPredicates(join.getLeft());
+      final RelOptPredicateList rightPredicates =
+          mq.getPulledUpPredicates(join.getRight());
+      final RelOptPredicateList predicates =
+          leftPredicates.union(rightPredicates.shift(fieldCount));
+      if (!reduceExpressions(join, expList, predicates, true)) {
+        return;
+      }
+      call.transformTo(
+          join.copy(
+              join.getTraitSet(),
+              expList.get(0),
+              join.getLeft(),
+              join.getRight(),
+              join.getJoinType(),
+              join.isSemiJoinDone()));
+
+      // New plan is absolutely better than old plan.
+      call.getPlanner().setImportance(join, 0.0);
+    }
+  }
+
+  //~ Constructors -----------------------------------------------------------
+
+  /**
+   * Creates a HiveReduceExpressionsRule.
+   *
+   * @param clazz class of rels to which this rule should apply
+   */
+  protected HiveReduceExpressionsRule(Class<? extends RelNode> clazz,
+                                      RelBuilderFactory relBuilderFactory, String desc) {
+    super(clazz, relBuilderFactory, desc);
+  }
+
 }
 
 // End HiveReduceExpressionsRule.java

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/annotate_stats_filter.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/annotate_stats_filter.q.out b/ql/src/test/results/clientpositive/annotate_stats_filter.q.out
index 66dd92b..e22c3ef 100644
--- a/ql/src/test/results/clientpositive/annotate_stats_filter.q.out
+++ b/ql/src/test/results/clientpositive/annotate_stats_filter.q.out
@@ -700,10 +700,10 @@ STAGE PLANS:
             alias: loc_orc
             Statistics: Num rows: 8 Data size: 816 Basic stats: COMPLETE Column stats: COMPLETE
             Filter Operator
-              predicate: ((year = 2001) and (state = 'OH') and (state = 'FL')) (type: boolean)
+              predicate: false (type: boolean)
               Statistics: Num rows: 1 Data size: 102 Basic stats: COMPLETE Column stats: COMPLETE
               Select Operator
-                expressions: 'FL' (type: string), locid (type: int), zip (type: bigint), 2001 (type: int)
+                expressions: state (type: string), locid (type: int), zip (type: bigint), year (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3
                 Statistics: Num rows: 1 Data size: 102 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/annotate_stats_part.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/annotate_stats_part.q.out b/ql/src/test/results/clientpositive/annotate_stats_part.q.out
index 4f1b62f..866d30a 100644
--- a/ql/src/test/results/clientpositive/annotate_stats_part.q.out
+++ b/ql/src/test/results/clientpositive/annotate_stats_part.q.out
@@ -261,12 +261,12 @@ STAGE PLANS:
           alias: loc_orc
           Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: PARTIAL
           Filter Operator
-            predicate: ((year = '2001') and (year = '__HIVE_DEFAULT_PARTITION__')) (type: boolean)
+            predicate: false (type: boolean)
             Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: PARTIAL
             Select Operator
-              expressions: state (type: string), locid (type: int), zip (type: bigint), '__HIVE_DEFAULT_PARTITION__' (type: string)
+              expressions: state (type: string), locid (type: int), zip (type: bigint), year (type: string)
               outputColumnNames: _col0, _col1, _col2, _col3
-              Statistics: Num rows: 1 Data size: 110 Basic stats: COMPLETE Column stats: PARTIAL
+              Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: PARTIAL
               ListSink
 
 PREHOOK: query: analyze table loc_orc partition(year='2001') compute statistics for columns state,locid

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_rp_join1.q.out b/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
index 28e97a5..695c6d6 100644
--- a/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
+++ b/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
@@ -119,7 +119,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@myinput1
 #### A masked pattern was here ####
 NULL
-Warning: Shuffle Join JOIN[10][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[9][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN SELECT sum(hash(a.key,a.value,b.key,b.value)) FROM myinput1 a FULL OUTER JOIN myinput1 b on a.key = 40 AND a.value = 40 AND a.key = a.value AND b.key = 40
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT sum(hash(a.key,a.value,b.key,b.value)) FROM myinput1 a FULL OUTER JOIN myinput1 b on a.key = 40 AND a.value = 40 AND a.key = a.value AND b.key = 40
@@ -141,7 +141,7 @@ STAGE PLANS:
               outputColumnNames: _col0, _col1
               Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
               Filter Operator
-                predicate: ((_col0 = _col1) and (_col1 = 40) and (_col0 = 40)) (type: boolean)
+                predicate: ((_col1 = 40) and (_col0 = 40)) (type: boolean)
                 Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   sort order: 
@@ -224,6 +224,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@myinput1
 #### A masked pattern was here ####
 NULL
+Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: EXPLAIN SELECT sum(hash(a.key,a.value,b.key,b.value)) FROM myinput1 a FULL OUTER JOIN myinput1 b on a.key = 40 AND a.key = b.key AND b.key = 40
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT sum(hash(a.key,a.value,b.key,b.value)) FROM myinput1 a FULL OUTER JOIN myinput1 b on a.key = 40 AND a.key = b.key AND b.key = 40
@@ -248,11 +249,9 @@ STAGE PLANS:
                 predicate: (_col0 = 40) (type: boolean)
                 Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
+                  sort order: 
                   Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: int)
+                  value expressions: _col0 (type: int), _col1 (type: int)
           TableScan
             alias: b
             Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
@@ -264,24 +263,22 @@ STAGE PLANS:
                 predicate: (_col0 = 40) (type: boolean)
                 Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
+                  sort order: 
                   Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: int)
+                  value expressions: _col0 (type: int), _col1 (type: int)
       Reduce Operator Tree:
         Join Operator
           condition map:
                Outer Join 0 to 1
           keys:
-            0 _col0 (type: int)
-            1 _col0 (type: int)
+            0 
+            1 
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: hash(_col0,_col1,_col2,_col3) (type: int)
             outputColumnNames: _col0
-            Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE
             Group By Operator
               aggregations: sum(_col0)
               mode: hash
@@ -322,6 +319,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
+Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: SELECT sum(hash(a.key,a.value,b.key,b.value)) FROM myinput1 a FULL OUTER JOIN myinput1 b on a.key = 40 AND a.key = b.key AND b.key = 40
 PREHOOK: type: QUERY
 PREHOOK: Input: default@myinput1

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/constprog2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog2.q.out b/ql/src/test/results/clientpositive/constprog2.q.out
index cbd98ba..7bfd0cf 100644
--- a/ql/src/test/results/clientpositive/constprog2.q.out
+++ b/ql/src/test/results/clientpositive/constprog2.q.out
@@ -30,7 +30,7 @@ STAGE PLANS:
             alias: src2
             Statistics: Num rows: 1000 Data size: 10603 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key = 86) (type: boolean)
+              predicate: (86 = key) (type: boolean)
               Statistics: Num rows: 500 Data size: 5301 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/constprog_partitioner.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog_partitioner.q.out b/ql/src/test/results/clientpositive/constprog_partitioner.q.out
index 508a928..8c7f9d3 100644
--- a/ql/src/test/results/clientpositive/constprog_partitioner.q.out
+++ b/ql/src/test/results/clientpositive/constprog_partitioner.q.out
@@ -30,7 +30,7 @@ STAGE PLANS:
             alias: src2
             Statistics: Num rows: 1000 Data size: 10603 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key = 100) (type: boolean)
+              predicate: (100 = key) (type: boolean)
               Statistics: Num rows: 500 Data size: 5301 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/constprog_semijoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog_semijoin.q.out b/ql/src/test/results/clientpositive/constprog_semijoin.q.out
index 1940987..040cfb4 100644
--- a/ql/src/test/results/clientpositive/constprog_semijoin.q.out
+++ b/ql/src/test/results/clientpositive/constprog_semijoin.q.out
@@ -421,26 +421,26 @@ STAGE PLANS:
             alias: table1
             Statistics: Num rows: 10 Data size: 200 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((dimid = 100) = true) and (dimid <> 100)) (type: boolean)
-              Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
+              predicate: false (type: boolean)
+              Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: id (type: int), val (type: string), val1 (type: string), dimid (type: int)
-                outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
+                expressions: id (type: int), val (type: string), val1 (type: string)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col3 (type: int), true (type: boolean)
+                  key expressions: 100 (type: int), true (type: boolean)
                   sort order: ++
-                  Map-reduce partition columns: _col3 (type: int), true (type: boolean)
-                  Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
+                  Map-reduce partition columns: 100 (type: int), true (type: boolean)
+                  Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string)
           TableScan
             alias: table3
             Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((id = 100) = true) and (id <> 100)) (type: boolean)
+              predicate: ((id = 100) and (id = 100) is not null) (type: boolean)
               Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: id (type: int), true (type: boolean)
+                expressions: 100 (type: int), true (type: boolean)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
@@ -458,13 +458,13 @@ STAGE PLANS:
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 _col3 (type: int), true (type: boolean)
+            0 100 (type: int), true (type: boolean)
             1 _col0 (type: int), _col1 (type: boolean)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 5 Data size: 110 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 5 Data size: 110 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -502,50 +502,50 @@ STAGE PLANS:
             alias: table1
             Statistics: Num rows: 10 Data size: 200 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((dimid) IN (100, 200) and ((dimid = 100) = true)) (type: boolean)
-              Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((dimid = 100) and (dimid = 100) is not null) (type: boolean)
+              Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: id (type: int), val (type: string), val1 (type: string), dimid (type: int)
-                outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: NONE
+                expressions: id (type: int), val (type: string), val1 (type: string)
+                outputColumnNames: _col0, _col1, _col2
+                Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col3 (type: int), true (type: boolean)
+                  key expressions: 100 (type: int), true (type: boolean)
                   sort order: ++
-                  Map-reduce partition columns: _col3 (type: int), true (type: boolean)
-                  Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: NONE
+                  Map-reduce partition columns: 100 (type: int), true (type: boolean)
+                  Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string)
           TableScan
             alias: table3
             Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((id) IN (100, 200) and ((id = 100) = true)) (type: boolean)
-              Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((id = 100) and (id = 100) is not null) (type: boolean)
+              Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: id (type: int), true (type: boolean)
+                expressions: 100 (type: int), true (type: boolean)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
                   keys: _col0 (type: int), _col1 (type: boolean)
                   mode: hash
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: int), _col1 (type: boolean)
                     sort order: ++
                     Map-reduce partition columns: _col0 (type: int), _col1 (type: boolean)
-                    Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 _col3 (type: int), true (type: boolean)
+            0 100 (type: int), true (type: boolean)
             1 _col0 (type: int), _col1 (type: boolean)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 2 Data size: 44 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 5 Data size: 110 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 2 Data size: 44 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 5 Data size: 110 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -585,50 +585,50 @@ STAGE PLANS:
             alias: table1
             Statistics: Num rows: 10 Data size: 200 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((dimid = 100) = true) and (dimid = 200)) (type: boolean)
-              Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: NONE
+              predicate: false (type: boolean)
+              Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: id (type: int), val (type: string), val1 (type: string)
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: 200 (type: int), true (type: boolean)
+                  key expressions: 100 (type: int), true (type: boolean)
                   sort order: ++
-                  Map-reduce partition columns: 200 (type: int), true (type: boolean)
-                  Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: NONE
+                  Map-reduce partition columns: 100 (type: int), true (type: boolean)
+                  Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string)
           TableScan
             alias: table3
             Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((id = 100) = true) and (id = 200)) (type: boolean)
-              Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((id = 100) and (id = 100) is not null) (type: boolean)
+              Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: 200 (type: int), true (type: boolean)
+                expressions: 100 (type: int), true (type: boolean)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
                   keys: _col0 (type: int), _col1 (type: boolean)
                   mode: hash
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: int), _col1 (type: boolean)
                     sort order: ++
                     Map-reduce partition columns: _col0 (type: int), _col1 (type: boolean)
-                    Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 200 (type: int), true (type: boolean)
+            0 100 (type: int), true (type: boolean)
             1 _col0 (type: int), _col1 (type: boolean)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 2 Data size: 44 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 2 Data size: 44 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -666,38 +666,38 @@ STAGE PLANS:
             alias: table1
             Statistics: Num rows: 10 Data size: 200 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((dimid = 100) = true) and (dimid = 100)) (type: boolean)
-              Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((dimid = 100) and (dimid = 100) is not null) (type: boolean)
+              Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: id (type: int), val (type: string), val1 (type: string)
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: 100 (type: int), true (type: boolean)
                   sort order: ++
                   Map-reduce partition columns: 100 (type: int), true (type: boolean)
-                  Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string)
           TableScan
             alias: table3
             Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((id = 100) = true) and (id = 100)) (type: boolean)
-              Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((id = 100) and (id = 100) is not null) (type: boolean)
+              Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: 100 (type: int), true (type: boolean)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
                   keys: _col0 (type: int), _col1 (type: boolean)
                   mode: hash
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: int), _col1 (type: boolean)
                     sort order: ++
                     Map-reduce partition columns: _col0 (type: int), _col1 (type: boolean)
-                    Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -706,10 +706,10 @@ STAGE PLANS:
             0 100 (type: int), true (type: boolean)
             1 _col0 (type: int), _col1 (type: boolean)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 2 Data size: 44 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 5 Data size: 110 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 2 Data size: 44 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 5 Data size: 110 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -749,26 +749,26 @@ STAGE PLANS:
             alias: table1
             Statistics: Num rows: 10 Data size: 200 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((dimid = 100) = true) and dimid is not null) (type: boolean)
+              predicate: ((dimid = 100) and (dimid = 100) is not null) (type: boolean)
               Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: id (type: int), val (type: string), val1 (type: string), dimid (type: int)
-                outputColumnNames: _col0, _col1, _col2, _col3
+                expressions: id (type: int), val (type: string), val1 (type: string)
+                outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col3 (type: int), true (type: boolean)
+                  key expressions: 100 (type: int), true (type: boolean)
                   sort order: ++
-                  Map-reduce partition columns: _col3 (type: int), true (type: boolean)
+                  Map-reduce partition columns: 100 (type: int), true (type: boolean)
                   Statistics: Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string)
           TableScan
             alias: table3
             Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((id = 100) = true) and id is not null) (type: boolean)
+              predicate: ((id = 100) and (id = 100) is not null) (type: boolean)
               Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: id (type: int), true (type: boolean)
+                expressions: 100 (type: int), true (type: boolean)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE
                 Group By Operator
@@ -786,7 +786,7 @@ STAGE PLANS:
           condition map:
                Left Semi Join 0 to 1
           keys:
-            0 _col3 (type: int), true (type: boolean)
+            0 100 (type: int), true (type: boolean)
             1 _col0 (type: int), _col1 (type: boolean)
           outputColumnNames: _col0, _col1, _col2
           Statistics: Num rows: 5 Data size: 110 Basic stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/cte_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cte_5.q.out b/ql/src/test/results/clientpositive/cte_5.q.out
index e9d700d..6bed6b1 100644
--- a/ql/src/test/results/clientpositive/cte_5.q.out
+++ b/ql/src/test/results/clientpositive/cte_5.q.out
@@ -63,6 +63,7 @@ src_thrift
 srcbucket
 srcbucket2
 srcpart
+Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: explain
 with q1 as (select * from src where key= '5')
 select a.colnum
@@ -87,18 +88,13 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: colnum is not null (type: boolean)
+              predicate: (UDFToDouble(colnum) = 5.0) (type: boolean)
               Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: colnum (type: int)
-                outputColumnNames: _col0
                 Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: UDFToDouble(_col0) (type: double)
-                  sort order: +
-                  Map-reduce partition columns: UDFToDouble(_col0) (type: double)
+                  sort order: 
                   Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: int)
           TableScan
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
@@ -108,26 +104,27 @@ STAGE PLANS:
               Select Operator
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: 5.0 (type: double)
-                  sort order: +
-                  Map-reduce partition columns: 5.0 (type: double)
+                  sort order: 
                   Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
-            0 UDFToDouble(_col0) (type: double)
-            1 5.0 (type: double)
-          outputColumnNames: _col0
-          Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
-          File Output Operator
-            compressed: false
-            Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+            0 
+            1 
+          Statistics: Num rows: 250 Data size: 3656 Basic stats: COMPLETE Column stats: NONE
+          Select Operator
+            expressions: 5 (type: int)
+            outputColumnNames: _col0
+            Statistics: Num rows: 250 Data size: 3656 Basic stats: COMPLETE Column stats: NONE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 250 Data size: 3656 Basic stats: COMPLETE Column stats: NONE
+              table:
+                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -135,6 +132,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
+Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: with q1 as (select * from src where key= '5')
 select a.colnum
 from mydb.q1 as a join q1 as b

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/filter_cond_pushdown.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/filter_cond_pushdown.q.out b/ql/src/test/results/clientpositive/filter_cond_pushdown.q.out
index 8cdc017..8c6f0f1 100644
--- a/ql/src/test/results/clientpositive/filter_cond_pushdown.q.out
+++ b/ql/src/test/results/clientpositive/filter_cond_pushdown.q.out
@@ -283,50 +283,50 @@ STAGE PLANS:
             alias: t2
             Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: NONE
+              predicate: (UDFToDouble(key) = 1.0) (type: boolean)
+              Statistics: Num rows: 10 Data size: 131 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), c_int (type: int), c_float (type: float)
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 10 Data size: 131 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: string), UDFToDouble(_col0) (type: double)
-                  sort order: ++
-                  Map-reduce partition columns: _col0 (type: string), UDFToDouble(_col0) (type: double)
-                  Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: NONE
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 10 Data size: 131 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: int), _col2 (type: float)
           TableScan
             alias: t3
             Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((c_int = 1) and key is not null) (type: boolean)
-              Statistics: Num rows: 10 Data size: 131 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((c_int = 1) and (UDFToDouble(key) = 1.0)) (type: boolean)
+              Statistics: Num rows: 5 Data size: 65 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), c_float (type: float)
-                outputColumnNames: _col0, _col2
-                Statistics: Num rows: 10 Data size: 131 Basic stats: COMPLETE Column stats: NONE
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 5 Data size: 65 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: string), 1.0 (type: double)
-                  sort order: ++
-                  Map-reduce partition columns: _col0 (type: string), 1.0 (type: double)
-                  Statistics: Num rows: 10 Data size: 131 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col2 (type: float)
+                  key expressions: _col0 (type: string)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: string)
+                  Statistics: Num rows: 5 Data size: 65 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: float)
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
-            0 _col0 (type: string), UDFToDouble(_col0) (type: double)
-            1 _col0 (type: string), 1.0 (type: double)
-          outputColumnNames: _col0, _col1, _col2, _col5
-          Statistics: Num rows: 22 Data size: 288 Basic stats: COMPLETE Column stats: NONE
+            0 _col0 (type: string)
+            1 _col0 (type: string)
+          outputColumnNames: _col0, _col1, _col2, _col4
+          Statistics: Num rows: 11 Data size: 144 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
-            predicate: (((_col2 + _col5) > 2.0) or ((_col1 + 1) > 2)) (type: boolean)
-            Statistics: Num rows: 14 Data size: 183 Basic stats: COMPLETE Column stats: NONE
+            predicate: (((_col2 + _col4) > 2.0) or ((_col1 + 1) > 2)) (type: boolean)
+            Statistics: Num rows: 6 Data size: 78 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: _col0 (type: string)
               outputColumnNames: _col0
-              Statistics: Num rows: 14 Data size: 183 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 6 Data size: 78 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
                 compressed: false
                 table:
@@ -341,23 +341,23 @@ STAGE PLANS:
             alias: t1
             Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: NONE
+              predicate: (UDFToDouble(key) = 1.0) (type: boolean)
+              Statistics: Num rows: 10 Data size: 131 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 10 Data size: 131 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 10 Data size: 131 Basic stats: COMPLETE Column stats: NONE
           TableScan
             Reduce Output Operator
               key expressions: _col0 (type: string)
               sort order: +
               Map-reduce partition columns: _col0 (type: string)
-              Statistics: Num rows: 14 Data size: 183 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 6 Data size: 78 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -366,10 +366,10 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0
-          Statistics: Num rows: 22 Data size: 288 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 11 Data size: 144 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 22 Data size: 288 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 11 Data size: 144 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/join42.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join42.q.out b/ql/src/test/results/clientpositive/join42.q.out
index 04a67ac..f50a921 100644
--- a/ql/src/test/results/clientpositive/join42.q.out
+++ b/ql/src/test/results/clientpositive/join42.q.out
@@ -142,7 +142,7 @@ STAGE PLANS:
             alias: la
             Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((loan_id = 4436) and aid is not null and pi_id is not null) (type: boolean)
+              predicate: ((4436 = loan_id) and aid is not null and pi_id is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: aid (type: int), pi_id (type: int)
@@ -156,7 +156,7 @@ STAGE PLANS:
             alias: fr
             Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (loan_id = 4436) (type: boolean)
+              predicate: (4436 = loan_id) (type: boolean)
               Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/llap/cte_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cte_5.q.out b/ql/src/test/results/clientpositive/llap/cte_5.q.out
index 9f9b718..b69f73d 100644
--- a/ql/src/test/results/clientpositive/llap/cte_5.q.out
+++ b/ql/src/test/results/clientpositive/llap/cte_5.q.out
@@ -63,6 +63,7 @@ src_thrift
 srcbucket
 srcbucket2
 srcpart
+Warning: Shuffle Join MERGEJOIN[13][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: explain
 with q1 as (select * from src where key= '5')
 select a.colnum
@@ -93,18 +94,13 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: colnum is not null (type: boolean)
+                    predicate: (UDFToDouble(colnum) = 5.0) (type: boolean)
                     Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: colnum (type: int)
-                      outputColumnNames: _col0
                       Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
-                        key expressions: UDFToDouble(_col0) (type: double)
-                        sort order: +
-                        Map-reduce partition columns: UDFToDouble(_col0) (type: double)
+                        sort order: 
                         Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE
-                        value expressions: _col0 (type: int)
             Execution mode: llap
             LLAP IO: no inputs
         Map 3 
@@ -118,9 +114,7 @@ STAGE PLANS:
                     Select Operator
                       Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
-                        key expressions: 5.0 (type: double)
-                        sort order: +
-                        Map-reduce partition columns: 5.0 (type: double)
+                        sort order: 
                         Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
             Execution mode: llap
             LLAP IO: no inputs
@@ -131,17 +125,20 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 keys:
-                  0 UDFToDouble(_col0) (type: double)
-                  1 5.0 (type: double)
-                outputColumnNames: _col0
-                Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
-                File Output Operator
-                  compressed: false
-                  Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                  0 
+                  1 
+                Statistics: Num rows: 250 Data size: 3656 Basic stats: COMPLETE Column stats: NONE
+                Select Operator
+                  expressions: 5 (type: int)
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 250 Data size: 3656 Basic stats: COMPLETE Column stats: NONE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 250 Data size: 3656 Basic stats: COMPLETE Column stats: NONE
+                    table:
+                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -149,6 +146,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
+Warning: Shuffle Join MERGEJOIN[13][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: with q1 as (select * from src where key= '5')
 select a.colnum
 from mydb.q1 as a join q1 as b

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out b/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out
index 0a1b0be..c83e955 100644
--- a/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out
@@ -632,10 +632,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: d1
-                  filterExpr: (id = 1) (type: boolean)
+                  filterExpr: (1 = id) (type: boolean)
                   Statistics: Num rows: 3 Data size: 15 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (id = 1) (type: boolean)
+                    predicate: (1 = id) (type: boolean)
                     Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
index 6ece5ca..ab1980d 100644
--- a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
@@ -1317,7 +1317,7 @@ STAGE PLANS:
                   alias: r
                   Statistics: Num rows: 12288 Data size: 2165060 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint = 6981) (type: boolean)
+                    predicate: (6981 = cint) (type: boolean)
                     Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cdecimal2 (type: decimal(23,14))
@@ -1515,7 +1515,7 @@ STAGE PLANS:
                   alias: r
                   Statistics: Num rows: 12288 Data size: 2165060 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint = 6981) (type: boolean)
+                    predicate: (6981 = cint) (type: boolean)
                     Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cdecimal2 (type: decimal(23,14))

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/llap/tez_self_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/tez_self_join.q.out b/ql/src/test/results/clientpositive/llap/tez_self_join.q.out
index d1e8e5c..0d63cc1 100644
--- a/ql/src/test/results/clientpositive/llap/tez_self_join.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_self_join.q.out
@@ -102,7 +102,7 @@ STAGE PLANS:
                   alias: self2
                   Statistics: Num rows: 3 Data size: 21 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (id3 = 'ab') (type: boolean)
+                    predicate: ('ab' = id3) (type: boolean)
                     Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/mapjoin2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mapjoin2.q.out b/ql/src/test/results/clientpositive/mapjoin2.q.out
index 5ae1ac7..4b96ed3 100644
--- a/ql/src/test/results/clientpositive/mapjoin2.q.out
+++ b/ql/src/test/results/clientpositive/mapjoin2.q.out
@@ -26,6 +26,7 @@ POSTHOOK: Input: default@values__tmp__table__2
 POSTHOOK: Output: default@tbl
 POSTHOOK: Lineage: tbl.n EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col1, type:string, comment:), ]
 POSTHOOK: Lineage: tbl.t SIMPLE [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col2, type:string, comment:), ]
+Warning: Map Join MAPJOIN[13][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
 PREHOOK: query: select a.n, a.t, isnull(b.n), isnull(b.t) from (select * from tbl where n = 1) a  left outer join  (select * from tbl where 1 = 2) b on a.n = b.n
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tbl
@@ -35,6 +36,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tbl
 #### A masked pattern was here ####
 1	one	true	true
+Warning: Map Join MAPJOIN[13][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
 PREHOOK: query: select isnull(a.n), isnull(a.t), b.n, b.t from (select * from tbl where 2 = 1) a  right outer join  (select * from tbl where n = 2) b on a.n = b.n
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tbl
@@ -44,6 +46,7 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tbl
 #### A masked pattern was here ####
 true	true	2	two
+Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select isnull(a.n), isnull(a.t), isnull(b.n), isnull(b.t) from (select * from tbl where n = 1) a  full outer join  (select * from tbl where n = 2) b on a.n = b.n
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tbl

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/mergejoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/mergejoin.q.out b/ql/src/test/results/clientpositive/mergejoin.q.out
index 5ce3e1a..33f8740 100644
--- a/ql/src/test/results/clientpositive/mergejoin.q.out
+++ b/ql/src/test/results/clientpositive/mergejoin.q.out
@@ -2655,6 +2655,7 @@ POSTHOOK: Input: default@tab_part
 POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
 480
+Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select * from (select * from tab where tab.key = 0)a full outer join (select * from tab_part where tab_part.key = 98)b on a.key = b.key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tab
@@ -2674,6 +2675,7 @@ POSTHOOK: Input: default@tab_part@ds=2008-04-08
 0	val_0	2008-04-08	NULL	NULL	NULL
 NULL	NULL	NULL	98	val_98	2008-04-08
 NULL	NULL	NULL	98	val_98	2008-04-08
+Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select * from (select * from tab where tab.key = 0)a right outer join (select * from tab_part where tab_part.key = 98)b on a.key = b.key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tab
@@ -2688,13 +2690,16 @@ POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
 NULL	NULL	NULL	98	val_98	2008-04-08
 NULL	NULL	NULL	98	val_98	2008-04-08
+Warning: Shuffle Join JOIN[13][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select * from
 (select * from tab where tab.key = 0)a
 full outer join
 (select * from tab_part where tab_part.key = 98)b join tab_part c on a.key = b.key and b.key = c.key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tab
+PREHOOK: Input: default@tab@ds=2008-04-08
 PREHOOK: Input: default@tab_part
+PREHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
 POSTHOOK: query: select * from
 (select * from tab where tab.key = 0)a
@@ -2702,9 +2707,12 @@ full outer join
 (select * from tab_part where tab_part.key = 98)b join tab_part c on a.key = b.key and b.key = c.key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tab
+POSTHOOK: Input: default@tab@ds=2008-04-08
 POSTHOOK: Input: default@tab_part
+POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
 Warning: Shuffle Join JOIN[14][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[11][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select * from
 (select * from tab where tab.key = 0)a
 full outer join
@@ -2727,6 +2735,7 @@ NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
 NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
 NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
 NULL	NULL	NULL	98	val_98	2008-04-08	98	val_98	2008-04-08
+Warning: Shuffle Join JOIN[13][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product
 Warning: Shuffle Join JOIN[10][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select * from
 (select * from tab where tab.key = 0)a
@@ -3254,12 +3263,15 @@ NULL	NULL	NULL	NULL	NULL	NULL	97	val_97	2008-04-08
 NULL	NULL	NULL	NULL	NULL	NULL	97	val_97	2008-04-08
 NULL	NULL	NULL	NULL	NULL	NULL	98	val_98	2008-04-08
 NULL	NULL	NULL	NULL	NULL	NULL	98	val_98	2008-04-08
+Warning: Shuffle Join JOIN[14][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[11][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select * from
 (select * from tab where tab.key = 0)a
 join
 (select * from tab_part where tab_part.key = 98)b on a.key = b.key full outer join tab_part c on b.key = c.key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tab
+PREHOOK: Input: default@tab@ds=2008-04-08
 PREHOOK: Input: default@tab_part
 PREHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####
@@ -3269,6 +3281,7 @@ join
 (select * from tab_part where tab_part.key = 98)b on a.key = b.key full outer join tab_part c on b.key = c.key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@tab
+POSTHOOK: Input: default@tab@ds=2008-04-08
 POSTHOOK: Input: default@tab_part
 POSTHOOK: Input: default@tab_part@ds=2008-04-08
 #### A masked pattern was here ####

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/ppd_outer_join5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_outer_join5.q.out b/ql/src/test/results/clientpositive/ppd_outer_join5.q.out
index cbc0e89..ab23d71 100644
--- a/ql/src/test/results/clientpositive/ppd_outer_join5.q.out
+++ b/ql/src/test/results/clientpositive/ppd_outer_join5.q.out
@@ -212,7 +212,7 @@ STAGE PLANS:
             alias: t3
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Filter Operator
-              predicate: (id = 20) (type: boolean)
+              predicate: (20 = id) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
                 expressions: 20 (type: int), key (type: string), value (type: string)
@@ -320,7 +320,7 @@ STAGE PLANS:
             alias: t3
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Filter Operator
-              predicate: (id = 20) (type: boolean)
+              predicate: (20 = id) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
                 expressions: 20 (type: int), key (type: string), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/ppd_udf_case.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_udf_case.q.out b/ql/src/test/results/clientpositive/ppd_udf_case.q.out
index 500168a..7678d03 100644
--- a/ql/src/test/results/clientpositive/ppd_udf_case.q.out
+++ b/ql/src/test/results/clientpositive/ppd_udf_case.q.out
@@ -52,7 +52,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((ds = '2008-04-08') and (key = '27')) (type: boolean)
+              predicate: ((ds = '2008-04-08') and ('27' = key)) (type: boolean)
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: value (type: string), hr (type: string)
@@ -196,7 +196,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key = '27') (type: boolean)
+              predicate: ('27' = key) (type: boolean)
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: value (type: string), hr (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/ppd_union_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_union_view.q.out b/ql/src/test/results/clientpositive/ppd_union_view.q.out
index 1994807..c267102 100644
--- a/ql/src/test/results/clientpositive/ppd_union_view.q.out
+++ b/ql/src/test/results/clientpositive/ppd_union_view.q.out
@@ -510,7 +510,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: ((ds = '2011-10-15') and keymap is not null) (type: boolean)
+              predicate: (('2011-10-15' = ds) and keymap is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
                 expressions: key (type: string), keymap (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out b/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out
index 02fb1db..f72c2a7 100644
--- a/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out
+++ b/ql/src/test/results/clientpositive/smb_mapjoin_25.q.out
@@ -80,7 +80,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 51 Data size: 206 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key = 5) (type: boolean)
+              predicate: (5 = key) (type: boolean)
               Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE
@@ -151,7 +151,7 @@ STAGE PLANS:
             alias: d
             Statistics: Num rows: 55 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key = 5) (type: boolean)
+              predicate: (5 = key) (type: boolean)
               Statistics: Num rows: 27 Data size: 108 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 Statistics: Num rows: 27 Data size: 108 Basic stats: COMPLETE Column stats: NONE
@@ -216,7 +216,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 51 Data size: 206 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key = 5) (type: boolean)
+              predicate: (5 = key) (type: boolean)
               Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE
@@ -392,7 +392,7 @@ STAGE PLANS:
             alias: d
             Statistics: Num rows: 55 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key = 5) (type: boolean)
+              predicate: (5 = key) (type: boolean)
               Statistics: Num rows: 27 Data size: 108 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 Statistics: Num rows: 27 Data size: 108 Basic stats: COMPLETE Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/ab3af5b0/ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out b/ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out
index 2c4db83..c29a699 100644
--- a/ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out
+++ b/ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out
@@ -38,8 +38,13 @@ STAGE PLANS:
                   alias: src2
                   Statistics: Num rows: 1000 Data size: 10603 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
+<<<<<<< HEAD
                     predicate: (UDFToDouble(key) = 100.0) (type: boolean)
                     Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE
+=======
+                    predicate: (100 = key) (type: boolean)
+                    Statistics: Num rows: 500 Data size: 5301 Basic stats: COMPLETE Column stats: NONE
+>>>>>>> 6897655... HIVE-13815: Improve logic to infer false predicates (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
                     Select Operator
                       expressions: value (type: string)
                       outputColumnNames: _col1


Mime
View raw message