hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [53/74] [abbrv] hive git commit: HIVE-17405: HoS DPP ConstantPropagate should use ConstantPropagateOption.SHORTCUT (Sahil Takiar, reviewed by Rui Li)
Date Fri, 08 Sep 2017 06:35:45 GMT
HIVE-17405: HoS DPP ConstantPropagate should use ConstantPropagateOption.SHORTCUT (Sahil Takiar, reviewed by Rui Li)


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

Branch: refs/heads/hive-14535
Commit: e3c71b009bdeb2191f12d60f288486a5d628ecae
Parents: 8f7c578
Author: Sahil Takiar <takiar.sahil@gmail.com>
Authored: Sat Sep 2 09:38:38 2017 -0700
Committer: Sahil Takiar <stakiar@cloudera.com>
Committed: Sat Sep 2 09:38:38 2017 -0700

----------------------------------------------------------------------
 .../hive/ql/parse/spark/SparkCompiler.java      |   13 +-
 ...spark_vectorized_dynamic_partition_pruning.q |   35 +-
 .../spark/skewjoin_union_remove_1.q.out         |   16 +-
 .../spark/skewjoin_union_remove_2.q.out         |    6 +-
 .../clientpositive/spark/skewjoinopt1.q.out     |   16 +-
 .../clientpositive/spark/skewjoinopt10.q.out    |    8 +-
 .../clientpositive/spark/skewjoinopt11.q.out    |    8 +-
 .../clientpositive/spark/skewjoinopt12.q.out    |    4 +-
 .../clientpositive/spark/skewjoinopt14.q.out    |    8 +-
 .../clientpositive/spark/skewjoinopt15.q.out    |   16 +-
 .../clientpositive/spark/skewjoinopt16.q.out    |    4 +-
 .../clientpositive/spark/skewjoinopt17.q.out    |   12 +-
 .../clientpositive/spark/skewjoinopt19.q.out    |    8 +-
 .../clientpositive/spark/skewjoinopt2.q.out     |   16 +-
 .../clientpositive/spark/skewjoinopt20.q.out    |    8 +-
 .../clientpositive/spark/skewjoinopt3.q.out     |    8 +-
 .../clientpositive/spark/skewjoinopt4.q.out     |   16 +-
 .../clientpositive/spark/skewjoinopt5.q.out     |    4 +-
 .../clientpositive/spark/skewjoinopt6.q.out     |    4 +-
 .../clientpositive/spark/skewjoinopt7.q.out     |    6 +-
 .../clientpositive/spark/skewjoinopt8.q.out     |    6 +-
 .../spark/spark_dynamic_partition_pruning.q.out |   12 +-
 ...k_vectorized_dynamic_partition_pruning.q.out | 4280 ++++++++++--------
 23 files changed, 2479 insertions(+), 2035 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SparkCompiler.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SparkCompiler.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SparkCompiler.java
index 73e596e..ab8db20 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SparkCompiler.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/spark/SparkCompiler.java
@@ -62,6 +62,7 @@ import org.apache.hadoop.hive.ql.lib.RuleRegExp;
 import org.apache.hadoop.hive.ql.lib.TypeRule;
 import org.apache.hadoop.hive.ql.log.PerfLogger;
 import org.apache.hadoop.hive.ql.optimizer.ConstantPropagate;
+import org.apache.hadoop.hive.ql.optimizer.ConstantPropagateProcCtx;
 import org.apache.hadoop.hive.ql.optimizer.DynamicPartitionPruningOptimization;
 import org.apache.hadoop.hive.ql.optimizer.SparkRemoveDynamicPruning;
 import org.apache.hadoop.hive.ql.optimizer.metainfo.annotation.AnnotateWithOpTraits;
@@ -130,6 +131,12 @@ public class SparkCompiler extends TaskCompiler {
     // Remove cyclic dependencies for DPP
     runCycleAnalysisForPartitionPruning(procCtx);
 
+    // Re-run constant propagation so we fold any new constants introduced by the operator optimizers
+    // Specifically necessary for DPP because we might have created lots of "and true and true" conditions
+    if (procCtx.getConf().getBoolVar(HiveConf.ConfVars.HIVEOPTCONSTANTPROPAGATION)) {
+      new ConstantPropagate(ConstantPropagateProcCtx.ConstantPropagateOption.SHORTCUT).transform(pCtx);
+    }
+
     PERF_LOGGER.PerfLogEnd(CLASS_NAME, PerfLogger.SPARK_OPTIMIZE_OPERATOR_TREE);
   }
 
@@ -284,12 +291,6 @@ public class SparkCompiler extends TaskCompiler {
     List<Node> topNodes = new ArrayList<Node>();
     topNodes.addAll(parseContext.getTopOps().values());
     ogw.startWalking(topNodes, null);
-
-    // need a new run of the constant folding because we might have created lots
-    // of "and true and true" conditions.
-    if(procCtx.getConf().getBoolVar(HiveConf.ConfVars.HIVEOPTCONSTANTPROPAGATION)) {
-      new ConstantPropagate().transform(parseContext);
-    }
   }
 
   private void runSetReducerParallelism(OptimizeSparkProcContext procCtx) throws SemanticException {

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/queries/clientpositive/spark_vectorized_dynamic_partition_pruning.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/spark_vectorized_dynamic_partition_pruning.q b/ql/src/test/queries/clientpositive/spark_vectorized_dynamic_partition_pruning.q
index 8868a34..b4ecbef 100644
--- a/ql/src/test/queries/clientpositive/spark_vectorized_dynamic_partition_pruning.q
+++ b/ql/src/test/queries/clientpositive/spark_vectorized_dynamic_partition_pruning.q
@@ -25,6 +25,22 @@ select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds)
 set hive.spark.dynamic.partition.pruning=true;
 select count(*) from srcpart where ds = '2008-04-08';
 
+-- single column, single key, udf with typechange
+EXPLAIN select count(*) from srcpart join srcpart_date on (day(srcpart.ds) = day(srcpart_date.ds)) where srcpart_date.`date` = '2008-04-08';
+select count(*) from srcpart join srcpart_date on (day(srcpart.ds) = day(srcpart_date.ds)) where srcpart_date.`date` = '2008-04-08';
+set hive.spark.dynamic.partition.pruning=false;
+EXPLAIN select count(*) from srcpart join srcpart_date on (day(srcpart.ds) = day(srcpart_date.ds)) where srcpart_date.`date` = '2008-04-08';
+select count(*) from srcpart join srcpart_date on (day(srcpart.ds) = day(srcpart_date.ds)) where srcpart_date.`date` = '2008-04-08';
+set hive.spark.dynamic.partition.pruning=true;
+
+-- multiple udfs and casts
+EXPLAIN select count(*) from srcpart join srcpart_date on abs(negative(cast(concat(cast(day(srcpart.ds) as string), "0") as bigint)) + 10) = abs(negative(cast(concat(cast(day(srcpart_date.ds) as string), "0") as bigint)) + 10) where srcpart_date.`date` = '2008-04-08';
+select count(*) from srcpart join srcpart_date on abs(negative(cast(concat(cast(day(srcpart.ds) as string), "0") as bigint)) + 10) = abs(negative(cast(concat(cast(day(srcpart_date.ds) as string), "0") as bigint)) + 10) where srcpart_date.`date` = '2008-04-08';
+
+-- implicit type conversion between join columns
+EXPLAIN select count(*) from srcpart join srcpart_date on cast(day(srcpart.ds) as smallint) = cast(day(srcpart_date.ds) as decimal) where srcpart_date.`date` = '2008-04-08';
+select count(*) from srcpart join srcpart_date on cast(day(srcpart.ds) as smallint) = cast(day(srcpart_date.ds) as decimal) where srcpart_date.`date` = '2008-04-08';
+
 -- multiple sources, single key
 EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr) 
 where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11;
@@ -121,6 +137,10 @@ EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_
 select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
 select count(*) from srcpart where ds = '2008-04-08';
 
+-- single column, single key, udf with typechange
+EXPLAIN select count(*) from srcpart join srcpart_date on (day(srcpart.ds) = day(srcpart_date.ds)) where srcpart_date.`date` = '2008-04-08';
+select count(*) from srcpart join srcpart_date on (day(srcpart.ds) = day(srcpart_date.ds)) where srcpart_date.`date` = '2008-04-08';
+
 -- multiple sources, single key
 EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr) 
 where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11;
@@ -172,21 +192,6 @@ where srcpart_date.`date` = '2008-04-08' and srcpart.hr = 13;
 EXPLAIN select distinct(ds) from srcpart where srcpart.ds in (select max(srcpart.ds) from srcpart union all select min(srcpart.ds) from srcpart);
 select distinct(ds) from srcpart where srcpart.ds in (select max(srcpart.ds) from srcpart union all select min(srcpart.ds) from srcpart);
 
-
--- different file format
-create table srcpart_orc (key int, value string) partitioned by (ds string, hr int) stored as orc;
-
-
-set hive.exec.dynamic.partition.mode=nonstrict;
-set hive.vectorized.execution.enabled=false;
-set hive.exec.max.dynamic.partitions=1000;
-
-insert into table srcpart_orc partition (ds, hr) select key, value, ds, hr from srcpart;
-EXPLAIN select count(*) from srcpart_orc join srcpart_date_hour on (srcpart_orc.ds = srcpart_date_hour.ds and srcpart_orc.hr = srcpart_date_hour.hr) where srcpart_date_hour.hour = 11 and (srcpart_date_hour.`date` = '2008-04-08' or srcpart_date_hour.`date` = '2008-04-09');
-select count(*) from srcpart_orc join srcpart_date_hour on (srcpart_orc.ds = srcpart_date_hour.ds and srcpart_orc.hr = srcpart_date_hour.hr) where srcpart_date_hour.hour = 11 and (srcpart_date_hour.`date` = '2008-04-08' or srcpart_date_hour.`date` = '2008-04-09');
-select count(*) from srcpart where (ds = '2008-04-08' or ds = '2008-04-09') and hr = 11;
-
-drop table srcpart_orc;
 drop table srcpart_date;
 drop table srcpart_hour;
 drop table srcpart_date_hour;

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_1.q.out b/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_1.q.out
index 759bbfd..30bd66a 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_1.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_1.q.out
@@ -94,7 +94,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -112,7 +112,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -237,7 +237,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: boolean)
+                    predicate: ((key <> '2') and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -255,7 +255,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: boolean)
+                    predicate: ((key <> '2') and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -392,7 +392,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -410,7 +410,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -557,7 +557,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: boolean)
+                    predicate: ((key <> '2') and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -575,7 +575,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: boolean)
+                    predicate: ((key <> '2') and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_2.q.out b/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_2.q.out
index 11da0dc..4f898bd 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_2.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoin_union_remove_2.q.out
@@ -128,7 +128,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -146,7 +146,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -164,7 +164,7 @@ STAGE PLANS:
                   alias: c
                   Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt1.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt1.q.out
index ae6031e..0929084 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt1.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt1.q.out
@@ -94,7 +94,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -112,7 +112,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -237,7 +237,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: boolean)
+                    predicate: ((key <> '2') and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -255,7 +255,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: boolean)
+                    predicate: ((key <> '2') and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -381,7 +381,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string)
@@ -398,7 +398,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string)
@@ -530,7 +530,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: boolean)
+                    predicate: ((key <> '2') and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string)
@@ -547,7 +547,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = '2') or (key = '3'))) (type: boolean)
+                    predicate: ((key <> '2') and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt10.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt10.q.out
index 3c8a254..f8bddea 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt10.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt10.q.out
@@ -60,7 +60,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '8')) (type: boolean)
+                    predicate: (key = '8') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Reduce Output Operator
                       key expressions: key (type: string)
@@ -73,7 +73,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '8')) (type: boolean)
+                    predicate: (key = '8') (type: boolean)
                     Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE
                     Reduce Output Operator
                       key expressions: key (type: string)
@@ -87,7 +87,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '8'))) (type: boolean)
+                    predicate: (key is not null and (key <> '8')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Reduce Output Operator
                       key expressions: key (type: string)
@@ -100,7 +100,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '8'))) (type: boolean)
+                    predicate: (key is not null and (key <> '8')) (type: boolean)
                     Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE
                     Reduce Output Operator
                       key expressions: key (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt11.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt11.q.out
index cb69cd1..9b4578b 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt11.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt11.q.out
@@ -68,7 +68,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -86,7 +86,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -104,7 +104,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -122,7 +122,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt12.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt12.q.out
index 6a716fb..ff386f8 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt12.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt12.q.out
@@ -92,7 +92,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not ((((key = '2') and (val = '12')) or ((key = '8') and (val = '18'))) or ((key = '3') and (val = '13'))))) (type: boolean)
+                    predicate: (key is not null and val is not null and ((((key <> '2') or (val <> '12')) and ((key <> '8') or (val <> '18'))) and ((key <> '3') or (val <> '13')))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -109,7 +109,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not ((((key = '2') and (val = '12')) or ((key = '8') and (val = '18'))) or ((key = '3') and (val = '13'))))) (type: boolean)
+                    predicate: (key is not null and val is not null and ((((key <> '2') or (val <> '12')) and ((key <> '8') or (val <> '18'))) and ((key <> '3') or (val <> '13')))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt14.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt14.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt14.q.out
index 9b6e5ff..8e75439 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt14.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt14.q.out
@@ -81,7 +81,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (key = '2')) (type: boolean)
+                    predicate: (val is not null and (key = '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -99,7 +99,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -135,7 +135,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and val is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -153,7 +153,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt15.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt15.q.out
index 2e76cad..21e7be2 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt15.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt15.q.out
@@ -126,7 +126,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = 2) or (key = 3)))) (type: boolean)
+                    predicate: (key is not null and ((key <> 2) and (key <> 3))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int), val (type: string)
@@ -144,7 +144,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = 2) or (key = 3)))) (type: boolean)
+                    predicate: (key is not null and ((key <> 2) and (key <> 3))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int), val (type: string)
@@ -269,7 +269,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = 2) or (key = 3))) (type: boolean)
+                    predicate: ((key <> 2) and (key <> 3)) (type: boolean)
                     Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int), val (type: string)
@@ -287,7 +287,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = 2) or (key = 3))) (type: boolean)
+                    predicate: ((key <> 2) and (key <> 3)) (type: boolean)
                     Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int), val (type: string)
@@ -413,7 +413,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = 2) or (key = 3)))) (type: boolean)
+                    predicate: (key is not null and ((key <> 2) and (key <> 3))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int)
@@ -430,7 +430,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = 2) or (key = 3)))) (type: boolean)
+                    predicate: (key is not null and ((key <> 2) and (key <> 3))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int)
@@ -562,7 +562,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = 2) or (key = 3))) (type: boolean)
+                    predicate: ((key <> 2) and (key <> 3)) (type: boolean)
                     Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int)
@@ -579,7 +579,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((key = 2) or (key = 3))) (type: boolean)
+                    predicate: ((key <> 2) and (key <> 3)) (type: boolean)
                     Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt16.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt16.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt16.q.out
index 484dbf7..7df389a 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt16.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt16.q.out
@@ -92,7 +92,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not (((key = '2') and (val = '12')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and val is not null and (((key <> '2') or (val <> '12')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -109,7 +109,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not (((key = '2') and (val = '12')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and val is not null and (((key <> '2') or (val <> '12')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt17.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt17.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt17.q.out
index 2ca749a..df3e2b5 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt17.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt17.q.out
@@ -58,7 +58,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -76,7 +76,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -94,7 +94,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -112,7 +112,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -287,7 +287,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not (((key = '2') and (val = '12')) or (key = '2')))) (type: boolean)
+                    predicate: (key is not null and val is not null and (((key <> '2') or (val <> '12')) and (key <> '2'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -304,7 +304,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not (((key = '2') and (val = '12')) or (key = '2')))) (type: boolean)
+                    predicate: (key is not null and val is not null and (((key <> '2') or (val <> '12')) and (key <> '2'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt19.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt19.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt19.q.out
index 9606b8c..3236fe3 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt19.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt19.q.out
@@ -58,7 +58,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -76,7 +76,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -94,7 +94,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -112,7 +112,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt2.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt2.q.out
index c1314b4..a2b146c 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt2.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt2.q.out
@@ -92,7 +92,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not ((((key = '2') or (key = '7')) or (key = '3')) or (key = '8')))) (type: boolean)
+                    predicate: (key is not null and val is not null and ((((key <> '2') and (key <> '7')) and (key <> '3')) and (key <> '8'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -109,7 +109,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not ((((key = '2') or (key = '7')) or (key = '3')) or (key = '8')))) (type: boolean)
+                    predicate: (key is not null and val is not null and ((((key <> '2') and (key <> '7')) and (key <> '3')) and (key <> '8'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -228,7 +228,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((((key = '2') or (key = '7')) or (key = '3')) or (key = '8'))) (type: boolean)
+                    predicate: ((((key <> '2') and (key <> '7')) and (key <> '3')) and (key <> '8')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -245,7 +245,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((((key = '2') or (key = '7')) or (key = '3')) or (key = '8'))) (type: boolean)
+                    predicate: ((((key <> '2') and (key <> '7')) and (key <> '3')) and (key <> '8')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -369,7 +369,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not ((((key = '2') or (key = '7')) or (key = '3')) or (key = '8')))) (type: boolean)
+                    predicate: (key is not null and val is not null and ((((key <> '2') and (key <> '7')) and (key <> '3')) and (key <> '8'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -386,7 +386,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and val is not null and (not ((((key = '2') or (key = '7')) or (key = '3')) or (key = '8')))) (type: boolean)
+                    predicate: (key is not null and val is not null and ((((key <> '2') and (key <> '7')) and (key <> '3')) and (key <> '8'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -528,7 +528,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((((key = '2') or (key = '7')) or (key = '3')) or (key = '8'))) (type: boolean)
+                    predicate: ((((key <> '2') and (key <> '7')) and (key <> '3')) and (key <> '8')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -545,7 +545,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not ((((key = '2') or (key = '7')) or (key = '3')) or (key = '8'))) (type: boolean)
+                    predicate: ((((key <> '2') and (key <> '7')) and (key <> '3')) and (key <> '8')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt20.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt20.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt20.q.out
index 0b38eff..e2432a2 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt20.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt20.q.out
@@ -58,7 +58,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -76,7 +76,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -94,7 +94,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -112,7 +112,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt3.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt3.q.out
index b01f348..1b41af5 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt3.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt3.q.out
@@ -94,7 +94,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -112,7 +112,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -237,7 +237,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not (((key = '2') or (key = '8')) or (key = '3'))) (type: boolean)
+                    predicate: (((key <> '2') and (key <> '8')) and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -255,7 +255,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (not (((key = '2') or (key = '8')) or (key = '3'))) (type: boolean)
+                    predicate: (((key <> '2') and (key <> '8')) and (key <> '3')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt4.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt4.q.out
index 608ca48..4dc6ee9 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt4.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt4.q.out
@@ -56,7 +56,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -74,7 +74,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -92,7 +92,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -110,7 +110,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -199,7 +199,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -217,7 +217,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (key = '2')) (type: boolean)
+                    predicate: (key = '2') (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -235,7 +235,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -253,7 +253,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (key = '2'))) (type: boolean)
+                    predicate: (key is not null and (key <> '2')) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt5.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt5.q.out
index 3f2a939..4408db6 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt5.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt5.q.out
@@ -94,7 +94,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -112,7 +112,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '2') or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '2') and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt6.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt6.q.out
index c00ab12..d963793 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt6.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt6.q.out
@@ -94,7 +94,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -112,7 +112,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt7.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt7.q.out
index 11da0dc..4f898bd 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt7.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt7.q.out
@@ -128,7 +128,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -146,7 +146,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -164,7 +164,7 @@ STAGE PLANS:
                   alias: c
                   Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not (((key = '2') or (key = '8')) or (key = '3')))) (type: boolean)
+                    predicate: (key is not null and (((key <> '2') and (key <> '8')) and (key <> '3'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/skewjoinopt8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/skewjoinopt8.q.out b/ql/src/test/results/clientpositive/spark/skewjoinopt8.q.out
index 38f2b1c..223665b 100644
--- a/ql/src/test/results/clientpositive/spark/skewjoinopt8.q.out
+++ b/ql/src/test/results/clientpositive/spark/skewjoinopt8.q.out
@@ -126,7 +126,7 @@ STAGE PLANS:
                   alias: a
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '3') or (key = '8')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '3') and (key <> '8'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -144,7 +144,7 @@ STAGE PLANS:
                   alias: b
                   Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '3') or (key = '8')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '3') and (key <> '8'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)
@@ -162,7 +162,7 @@ STAGE PLANS:
                   alias: c
                   Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (key is not null and (not ((key = '3') or (key = '8')))) (type: boolean)
+                    predicate: (key is not null and ((key <> '3') and (key <> '8'))) (type: boolean)
                     Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/e3c71b00/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out b/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out
index 51e6c89..4504994 100644
--- a/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out
+++ b/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out
@@ -2560,9 +2560,9 @@ STAGE PLANS:
                       outputColumnNames: _col0
                       Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
-                        key expressions: '2008-04-08' (type: string)
+                        key expressions: _col0 (type: string)
                         sort order: +
-                        Map-reduce partition columns: '2008-04-08' (type: string)
+                        Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
         Reducer 2 
             Reduce Operator Tree:
@@ -2599,7 +2599,7 @@ STAGE PLANS:
         Reducer 5 
             Reduce Operator Tree:
               Group By Operator
-                keys: '2008-04-08' (type: string)
+                keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
@@ -5414,16 +5414,16 @@ STAGE PLANS:
                       outputColumnNames: _col0
                       Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
-                        key expressions: '2008-04-08' (type: string)
+                        key expressions: _col0 (type: string)
                         sort order: +
-                        Map-reduce partition columns: '2008-04-08' (type: string)
+                        Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE
         Reducer 4 
             Local Work:
               Map Reduce Local Work
             Reduce Operator Tree:
               Group By Operator
-                keys: '2008-04-08' (type: string)
+                keys: KEY._col0 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0
                 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE


Mime
View raw message