http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out 
b/ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out
index ba83ace..2d3f12b 100644
--- a/ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out
+++ b/ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out
@@ -523,7 +523,7 @@ PREHOOK: Input: default@src1
 PREHOOK: Input: default@src2
 PREHOOK: Output: database:default
 PREHOOK: Output: default@dest3
-{"version":"1.0","engine":"mr","database":"default","hash":"a2c4e9a3ec678039814f5d84b1e38ce4","queryText":"create
 table dest3 as\n  select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE 
length(key) > 
1","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"(src1.key
 is not null and (length(src1.key) > 
1))","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key
 = 
src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"(src2.key2
 is not null and (length(src2.key2) > 
1))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest3.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest3.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest3.key2"},{"id":3,"vert
 
exType":"COLUMN","vertexId":"default.dest3.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]}
+{"version":"1.0","engine":"mr","database":"default","hash":"a2c4e9a3ec678039814f5d84b1e38ce4","queryText":"create
 table dest3 as\n  select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE 
length(key) > 
1","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"((length(src1.key)
 > 1) and src1.key is not 
null)","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key
 = 
src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"((length(src2.key2)
 > 1) and src2.key2 is not 
null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest3.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest3.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest3.key2"},{"id":3,"vert
 
exType":"COLUMN","vertexId":"default.dest3.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]}
 PREHOOK: query: insert overwrite table dest2
   select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 3
 PREHOOK: type: QUERY
@@ -646,7 +646,7 @@ PREHOOK: type: QUERY
 PREHOOK: Input: default@dest_l2
 PREHOOK: Input: default@dest_l3
 #### A masked pattern was here ####
-{"version":"1.0","engine":"mr","database":"default","hash":"01879c619517509d9f5b6ead998bb4bb","queryText":"select
 sum(a.c1), count(b.c1), b.c2, b.c3\nfrom dest_l2 a join dest_l3 b on (a.id = 
b.id)\nwhere a.c2 != 10 and b.c3 > 0\ngroup by a.c1, a.c2, a.id, b.c1, b.c2, 
b.c3\nhaving count(a.c2) > 0\norder by b.c3 limit 
5","edges":[{"sources":[4],"targets":[0],"expression":"sum(default.dest_l2.c1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"count(default.dest_l3.c1)","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[8,9],"targets":[0,1,2,3],"expression":"(a.id
 is not null and (a.c2 <> 
10))","edgeType":"PREDICATE"},{"sources":[8,10],"targets":[0,1,2,3],"expression":"(a.id
 = 
b.id)","edgeType":"PREDICATE"},{"sources":[10,7],"targets":[0,1,2,3],"expression":"(b.id
 is not null and (b.c3 > 
0))","edgeType":"PREDICATE"},{"sources":[9],"targets":[0,1,2,3],"expression":"(count(d
 efault.dest_l2.c2) > 
0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"b.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"b.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"}]}
+{"version":"1.0","engine":"mr","database":"default","hash":"01879c619517509d9f5b6ead998bb4bb","queryText":"select
 sum(a.c1), count(b.c1), b.c2, b.c3\nfrom dest_l2 a join dest_l3 b on (a.id = 
b.id)\nwhere a.c2 != 10 and b.c3 > 0\ngroup by a.c1, a.c2, a.id, b.c1, b.c2, 
b.c3\nhaving count(a.c2) > 0\norder by b.c3 limit 
5","edges":[{"sources":[4],"targets":[0],"expression":"sum(default.dest_l2.c1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"count(default.dest_l3.c1)","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[8,9],"targets":[0,1,2,3],"expression":"((a.c2
 <> 10) and a.id is not 
null)","edgeType":"PREDICATE"},{"sources":[9,10],"targets":[0,1,2,3],"expression":"(a.id
 = 
b.id)","edgeType":"PREDICATE"},{"sources":[7,10],"targets":[0,1,2,3],"expression":"((b.c3
 > 0) and b.id is not 
null)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3],"expression":"(count(d
 efault.dest_l2.c2) > 
0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"b.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"b.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"}]}
 1      1       s2      15
 PREHOOK: query: drop table if exists t
 PREHOOK: type: DROPTABLE
@@ -659,7 +659,7 @@ PREHOOK: Input: default@dest_l2
 PREHOOK: Input: default@dest_l3
 PREHOOK: Output: database:default
 PREHOOK: Output: default@t
-{"version":"1.0","engine":"mr","database":"default","hash":"0d2f15b494111ffe236d5be42a76fa28","queryText":"create
 table t as\nselect distinct a.c2, a.c3 from dest_l2 a\ninner join dest_l3 b on 
(a.id = b.id)\nwhere a.id > 0 and b.c3 = 
15","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1],"expression":"(a.id
 is not null and (a.id > 
0))","edgeType":"PREDICATE"},{"sources":[4,5],"targets":[0,1],"expression":"(a.id
 = 
b.id)","edgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1],"expression":"(b.id
 is not null and (b.c3 = 15) and (b.id > 
0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.t.c2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.t.c3"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":5,"verte
 
xType":"COLUMN","vertexId":"default.dest_l3.id"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]}
+{"version":"1.0","engine":"mr","database":"default","hash":"0d2f15b494111ffe236d5be42a76fa28","queryText":"create
 table t as\nselect distinct a.c2, a.c3 from dest_l2 a\ninner join dest_l3 b on 
(a.id = b.id)\nwhere a.id > 0 and b.c3 = 
15","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1],"expression":"(a.id
 > 
0)","edgeType":"PREDICATE"},{"sources":[4,5],"targets":[0,1],"expression":"(a.id
 = 
b.id)","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1],"expression":"((b.c3
 = 15) and (b.id > 
0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.t.c2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.t.c3"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.
 id"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]}
 PREHOOK: query: SELECT substr(src1.key,1,1), count(DISTINCT 
substr(src1.value,5)),
 concat(substr(src1.key,1,1),sum(substr(src1.value,5)))
 from src1

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/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 3dced2a..12ac9c8 100644
--- a/ql/src/test/results/clientpositive/constprog_partitioner.q.out
+++ b/ql/src/test/results/clientpositive/constprog_partitioner.q.out
@@ -108,7 +108,7 @@ STAGE PLANS:
             alias: li
             Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (l_orderkey is not null and (l_linenumber = 1)) 
(type: boolean)
+              predicate: ((l_linenumber = 1) and l_orderkey is not null) 
(type: boolean)
               Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: l_orderkey (type: int), l_partkey (type: int), 
l_suppkey (type: int), 1 (type: int)
@@ -124,7 +124,7 @@ STAGE PLANS:
             alias: li
             Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (((l_shipmode = 'AIR') and l_orderkey is not null) 
and (l_linenumber = 1)) (type: boolean)
+              predicate: (((l_shipmode = 'AIR') and (l_linenumber = 1)) and 
l_orderkey is not null) (type: boolean)
               Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: l_orderkey (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/constprog_when_case.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog_when_case.q.out 
b/ql/src/test/results/clientpositive/constprog_when_case.q.out
index 2f939ba..4d2214a 100644
--- a/ql/src/test/results/clientpositive/constprog_when_case.q.out
+++ b/ql/src/test/results/clientpositive/constprog_when_case.q.out
@@ -46,7 +46,7 @@ STAGE PLANS:
             alias: src_orc
             Statistics: Num rows: 1000 Data size: 266000 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
-              expressions: if(CASE WHEN (bool0) THEN (true) WHEN ((not bool0)) 
THEN (false) END, key0, if(CASE WHEN (bool0) THEN (false) WHEN ((not bool0)) 
THEN (true) END, key1, key2)) (type: string)
+              expressions: if(CASE WHEN (bool0) THEN (true) WHEN ((not bool0)) 
THEN (false) ELSE (null) END, key0, if(CASE WHEN (bool0) THEN (false) WHEN 
((not bool0)) THEN (true) ELSE (null) END, key1, key2)) (type: string)
               outputColumnNames: _col0
               Statistics: Num rows: 1000 Data size: 266000 Basic stats: 
COMPLETE Column stats: NONE
               File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer13.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
index 2694df8..8aeec44 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
@@ -162,7 +162,7 @@ STAGE PLANS:
             alias: x
             Statistics: Num rows: 1028 Data size: 22964 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (((c2 > 100) and c3 is not null) and (c1 < 120)) 
(type: boolean)
+              predicate: (((c2 > 100) and (c1 < 120)) and c3 is not null) 
(type: boolean)
               Statistics: Num rows: 114 Data size: 2546 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: c3 (type: string), c1 (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/correlationoptimizer8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer8.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer8.q.out
index 0065891..1a51fc5 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer8.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer8.q.out
@@ -103,7 +103,7 @@ STAGE PLANS:
             alias: x
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or 
(UDFToDouble(key) > 100.0))) (type: boolean)
+              predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 
100.0)) and key is not null) (type: boolean)
               Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -290,7 +290,7 @@ STAGE PLANS:
             alias: x
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or 
(UDFToDouble(key) > 100.0))) (type: boolean)
+              predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 
100.0)) and key is not null) (type: boolean)
               Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -963,7 +963,7 @@ STAGE PLANS:
             alias: x
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or 
(UDFToDouble(key) > 100.0))) (type: boolean)
+              predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 
100.0)) and key is not null) (type: boolean)
               Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer9.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
index 7c7d25c..59f6abd 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
@@ -464,7 +464,7 @@ STAGE PLANS:
             alias: x
             Statistics: Num rows: 1028 Data size: 22964 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (((c2 > 100) and c3 is not null) and (c1 < 120)) 
(type: boolean)
+              predicate: (((c2 > 100) and (c1 < 120)) and c3 is not null) 
(type: boolean)
               Statistics: Num rows: 114 Data size: 2546 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: c1 (type: int), c3 (type: string)
@@ -579,7 +579,7 @@ STAGE PLANS:
             alias: x
             Statistics: Num rows: 1028 Data size: 22964 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (((c2 > 100) and c3 is not null) and (c1 < 120)) 
(type: boolean)
+              predicate: (((c2 > 100) and (c1 < 120)) and c3 is not null) 
(type: boolean)
               Statistics: Num rows: 114 Data size: 2546 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: c1 (type: int), c3 (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/decimal_udf.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/decimal_udf.q.out 
b/ql/src/test/results/clientpositive/decimal_udf.q.out
index 54c9f05..dad8663 100644
--- a/ql/src/test/results/clientpositive/decimal_udf.q.out
+++ b/ql/src/test/results/clientpositive/decimal_udf.q.out
@@ -973,7 +973,7 @@ STAGE PLANS:
           alias: decimal_udf
           Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column 
stats: NONE
           Filter Operator
-            predicate: (key is not null and (key <> 0)) (type: boolean)
+            predicate: (key <> 0) (type: boolean)
             Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: (key / key) (type: decimal(38,24))
@@ -1039,7 +1039,7 @@ STAGE PLANS:
           alias: decimal_udf
           Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column 
stats: NONE
           Filter Operator
-            predicate: (value is not null and (value <> 0)) (type: boolean)
+            predicate: (value <> 0) (type: boolean)
             Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: (key / CAST( value AS decimal(10,0))) (type: 
decimal(31,21))
@@ -1095,7 +1095,7 @@ STAGE PLANS:
           alias: decimal_udf
           Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column 
stats: NONE
           Filter Operator
-            predicate: (value is not null and (value <> 0)) (type: boolean)
+            predicate: (value <> 0) (type: boolean)
             Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: (UDFToDouble(key) / (UDFToDouble(value) / 2.0)) 
(type: double)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/dynamic_rdd_cache.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/dynamic_rdd_cache.q.out 
b/ql/src/test/results/clientpositive/dynamic_rdd_cache.q.out
index 3b04326..ea9529d 100644
--- a/ql/src/test/results/clientpositive/dynamic_rdd_cache.q.out
+++ b/ql/src/test/results/clientpositive/dynamic_rdd_cache.q.out
@@ -1025,7 +1025,7 @@ STAGE PLANS:
             alias: date_dim
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: (((d_year = 1999) and d_date_sk is not null) and 
(d_moy = 3)) (type: boolean)
+              predicate: (((d_year = 1999) and (d_moy = 3)) and d_date_sk is 
not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
                 expressions: d_date_sk (type: int)
@@ -1084,10 +1084,10 @@ STAGE PLANS:
             outputColumnNames: _col1, _col2, _col4, _col5
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: (CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / 
_col4)) END > 1.0) (type: boolean)
+              predicate: CASE WHEN ((_col4 = 0.0)) THEN (false) ELSE (((_col5 
/ _col4) > 1.0)) END (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
-                expressions: _col1 (type: int), _col2 (type: int), _col4 
(type: double), CASE (_col4) WHEN (0) THEN (null) ELSE ((_col5 / _col4)) END 
(type: double)
+                expressions: _col1 (type: int), _col2 (type: int), _col4 
(type: double), CASE WHEN ((_col4 = 0.0)) THEN (null) ELSE ((_col5 / _col4)) 
END (type: double)
                 outputColumnNames: _col1, _col2, _col4, _col5
                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE
                 File Output Operator
@@ -1262,7 +1262,7 @@ STAGE PLANS:
             alias: date_dim
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: (((d_year = 1999) and d_date_sk is not null) and 
(d_moy = 4)) (type: boolean)
+              predicate: (((d_year = 1999) and (d_moy = 4)) and d_date_sk is 
not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
                 expressions: d_date_sk (type: int)
@@ -1321,10 +1321,10 @@ STAGE PLANS:
             outputColumnNames: _col1, _col2, _col4, _col5
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: (CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / 
_col4)) END > 1.0) (type: boolean)
+              predicate: CASE WHEN ((_col4 = 0.0)) THEN (false) ELSE (((_col5 
/ _col4) > 1.0)) END (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
-                expressions: _col1 (type: int), _col2 (type: int), _col4 
(type: double), CASE (_col4) WHEN (0) THEN (null) ELSE ((_col5 / _col4)) END 
(type: double)
+                expressions: _col1 (type: int), _col2 (type: int), _col4 
(type: double), CASE WHEN ((_col4 = 0.0)) THEN (null) ELSE ((_col5 / _col4)) 
END (type: double)
                 outputColumnNames: _col1, _col2, _col4, _col5
                 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/a6d9bf76/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 0649353..738286e 100644
--- a/ql/src/test/results/clientpositive/filter_cond_pushdown.q.out
+++ b/ql/src/test/results/clientpositive/filter_cond_pushdown.q.out
@@ -37,7 +37,7 @@ STAGE PLANS:
             alias: f
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((value is not null and (value <> '')) and key is not 
null) (type: boolean)
+              predicate: ((value <> '') and key is not null) (type: boolean)
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -79,7 +79,7 @@ STAGE PLANS:
             alias: f
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (value is not null and (value <> '')) (type: boolean)
+              predicate: (value <> '') (type: boolean)
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: value (type: string)
@@ -163,7 +163,7 @@ STAGE PLANS:
             alias: f
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((value is not null and (value <> '')) and key is not 
null) (type: boolean)
+              predicate: ((value <> '') and key is not null) (type: boolean)
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -205,7 +205,7 @@ STAGE PLANS:
             alias: f
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (value is not null and (value <> '')) (type: boolean)
+              predicate: (value <> '') (type: boolean)
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: value (type: string)
@@ -419,7 +419,7 @@ STAGE PLANS:
             alias: f
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (((key is not null and ((value = '2008-04-10') or 
(value = '2008-04-08'))) and value is not null) and (value <> '')) (type: 
boolean)
+              predicate: ((((value = '2008-04-10') or (value = '2008-04-08')) 
and (value <> '')) and key is not null) (type: boolean)
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/filter_join_breaktask.q.out 
b/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
index 44add83..8ccd129 100644
--- a/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
+++ b/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
@@ -168,7 +168,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: ((key is not null and value is not null) and (value 
<> '')) (type: boolean)
+              predicate: ((value <> '') and key is not null) (type: boolean)
               Statistics: Num rows: 25 Data size: 211 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: int), value (type: string)
@@ -279,7 +279,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: (value is not null and (value <> '')) (type: boolean)
+              predicate: (value <> '') (type: boolean)
               Statistics: Num rows: 25 Data size: 211 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/fold_case.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/fold_case.q.out 
b/ql/src/test/results/clientpositive/fold_case.q.out
index aaf1fc4..90ea0af 100644
--- a/ql/src/test/results/clientpositive/fold_case.q.out
+++ b/ql/src/test/results/clientpositive/fold_case.q.out
@@ -16,7 +16,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: NVL((key = '238'),false) (type: boolean)
+              predicate: (key = '238') (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
@@ -67,10 +67,10 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (not NVL((key = '238'),false)) (type: boolean)
-              Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
+              predicate: (key <> '238') (type: boolean)
+              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
-                Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: count(1)
                   mode: hash
@@ -366,15 +366,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (not NVL((key = '238'),false)) (type: boolean)
-              Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
+              predicate: (key <> '238') (type: boolean)
+              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
-                expressions: CASE (key) WHEN ('238') THEN (null) ELSE (false) 
END (type: boolean)
+                expressions: CASE WHEN ((key = '238')) THEN (null) ELSE 
(false) END (type: boolean)
                 outputColumnNames: _col0
-                Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
                   table:
                       input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -442,10 +442,10 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (key <> '238') (type: boolean)
-              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
+              predicate: (not (key = '238')) (type: boolean)
+              Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
-                Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
                 Group By Operator
                   aggregations: count(1)
                   mode: hash

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out 
b/ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out
index f6badb7..106ad6b 100644
--- a/ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out
+++ b/ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out
@@ -101,10 +101,10 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: NVL((key = '238'),false) (type: boolean)
+              predicate: (key = '238') (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
-                expressions: key (type: string)
+                expressions: '238' (type: string)
                 outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
@@ -137,15 +137,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: CASE (key) WHEN ('238') THEN (true) WHEN ('94') THEN 
(true) ELSE (false) END (type: boolean)
-              Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
+              predicate: ((key = '238') or (key = '94')) (type: boolean)
+              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
                   table:
                       input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -173,7 +173,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: NVL((key = '238'),false) (type: boolean)
+              predicate: CASE WHEN ((key <> '238')) THEN ((key = '238')) ELSE 
((key = '238')) END (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -209,7 +209,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: CASE (key) WHEN ('238') THEN (CASE WHEN ((key <> 
'238')) THEN (true) WHEN ((key = '23')) THEN (true) END) END (type: boolean)
+              predicate: CASE WHEN ((key <> '238')) THEN ((key = '238')) WHEN 
((key = '23')) THEN ((key = '238')) ELSE (null) END (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/fold_when.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/fold_when.q.out 
b/ql/src/test/results/clientpositive/fold_when.q.out
index 699341e..5b68408 100644
--- a/ql/src/test/results/clientpositive/fold_when.q.out
+++ b/ql/src/test/results/clientpositive/fold_when.q.out
@@ -156,7 +156,7 @@ STAGE PLANS:
               predicate: (key = '238') (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
-                expressions: '238' (type: string)
+                expressions: key (type: string)
                 outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
@@ -194,7 +194,7 @@ STAGE PLANS:
               predicate: (key = '238') (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
-                expressions: '238' (type: string)
+                expressions: key (type: string)
                 outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
@@ -290,10 +290,10 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: NVL((key = '238'),false) (type: boolean)
+              predicate: (key = '238') (type: boolean)
               Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
-                expressions: key (type: string)
+                expressions: '238' (type: string)
                 outputColumnNames: _col0
                 Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
@@ -328,15 +328,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (not NVL((key = '238'),false)) (type: boolean)
-              Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
+              predicate: (key <> '238') (type: boolean)
+              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
                   table:
                       input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -435,15 +435,15 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (not NVL((key = '11'),false)) (type: boolean)
-              Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE 
Column stats: NONE
+              predicate: (key <> '11') (type: boolean)
+              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 500 Data size: 5312 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/a6d9bf76/ql/src/test/results/clientpositive/index_auto_self_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/index_auto_self_join.q.out 
b/ql/src/test/results/clientpositive/index_auto_self_join.q.out
index 9a6c05f..189a35a 100644
--- a/ql/src/test/results/clientpositive/index_auto_self_join.q.out
+++ b/ql/src/test/results/clientpositive/index_auto_self_join.q.out
@@ -20,7 +20,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((value is not null and (UDFToDouble(key) > 80.0)) 
and (UDFToDouble(key) < 100.0)) (type: boolean)
+              predicate: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 
100.0)) and value is not null) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -36,7 +36,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((value is not null and (UDFToDouble(key) > 70.0)) 
and (UDFToDouble(key) < 90.0)) (type: boolean)
+              predicate: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 
90.0)) and value is not null) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -172,10 +172,10 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            filterExpr: ((value is not null and (UDFToDouble(key) > 80.0)) and 
(UDFToDouble(key) < 100.0)) (type: boolean)
+            filterExpr: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 
100.0)) and value is not null) (type: boolean)
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((value is not null and (UDFToDouble(key) > 80.0)) 
and (UDFToDouble(key) < 100.0)) (type: boolean)
+              predicate: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 
100.0)) and value is not null) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -189,10 +189,10 @@ STAGE PLANS:
                   value expressions: _col0 (type: string)
           TableScan
             alias: a
-            filterExpr: ((value is not null and (UDFToDouble(key) > 70.0)) and 
(UDFToDouble(key) < 90.0)) (type: boolean)
+            filterExpr: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 
90.0)) and value is not null) (type: boolean)
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((value is not null and (UDFToDouble(key) > 70.0)) 
and (UDFToDouble(key) < 90.0)) (type: boolean)
+              predicate: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 
90.0)) and value is not null) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/index_auto_unused.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/index_auto_unused.q.out 
b/ql/src/test/results/clientpositive/index_auto_unused.q.out
index 75597a9..81079f8 100644
--- a/ql/src/test/results/clientpositive/index_auto_unused.q.out
+++ b/ql/src/test/results/clientpositive/index_auto_unused.q.out
@@ -356,37 +356,25 @@ PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN SELECT * FROM srcpart WHERE ds='2008-04-09' AND hr=12 
AND key < 10
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: srcpart
-            filterExpr: (UDFToDouble(key) < 10.0) (type: boolean)
-            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
-            Filter Operator
-              predicate: (UDFToDouble(key) < 10.0) (type: boolean)
-              Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE
-              Select Operator
-                expressions: key (type: string), value (type: string), 
'2008-04-09' (type: string), '12' (type: string)
-                outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 166 Data size: 1763 Basic stats: 
COMPLETE Column stats: NONE
-                File Output Operator
-                  compressed: false
-                  Statistics: Num rows: 166 Data size: 1763 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
       limit: -1
       Processor Tree:
-        ListSink
+        TableScan
+          alias: srcpart
+          filterExpr: (UDFToDouble(key) < 10.0) (type: boolean)
+          Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
+          Filter Operator
+            predicate: (UDFToDouble(key) < 10.0) (type: boolean)
+            Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE
+            Select Operator
+              expressions: key (type: string), value (type: string), 
'2008-04-09' (type: string), hr (type: string)
+              outputColumnNames: _col0, _col1, _col2, _col3
+              Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE
+              ListSink
 
 PREHOOK: query: SELECT * FROM srcpart WHERE ds='2008-04-09' AND hr=12 AND key 
< 10
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/input_part3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input_part3.q.out 
b/ql/src/test/results/clientpositive/input_part3.q.out
index 3514bb7..3c1b29b 100644
--- a/ql/src/test/results/clientpositive/input_part3.q.out
+++ b/ql/src/test/results/clientpositive/input_part3.q.out
@@ -16,7 +16,7 @@ STAGE PLANS:
           alias: x
           Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
           Select Operator
-            expressions: key (type: string), value (type: string), 
'2008-04-08' (type: string), '11' (type: string)
+            expressions: key (type: string), value (type: string), 
'2008-04-08' (type: string), hr (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             ListSink

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/join34.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join34.q.out 
b/ql/src/test/results/clientpositive/join34.q.out
index f1bf494..e2c2b1a 100644
--- a/ql/src/test/results/clientpositive/join34.q.out
+++ b/ql/src/test/results/clientpositive/join34.q.out
@@ -159,7 +159,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or 
(UDFToDouble(key) > 100.0))) (type: boolean)
+              predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 
100.0)) and key is not null) (type: boolean)
               Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/join35.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join35.q.out 
b/ql/src/test/results/clientpositive/join35.q.out
index 3ff41ea..663642c 100644
--- a/ql/src/test/results/clientpositive/join35.q.out
+++ b/ql/src/test/results/clientpositive/join35.q.out
@@ -273,7 +273,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or 
(UDFToDouble(key) > 100.0))) (type: boolean)
+              predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 
100.0)) and key is not null) (type: boolean)
               Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/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 6b08ab9..4715bb5 100644
--- a/ql/src/test/results/clientpositive/join42.q.out
+++ b/ql/src/test/results/clientpositive/join42.q.out
@@ -80,6 +80,8 @@ POSTHOOK: Output: default@acct
 POSTHOOK: Lineage: acct.acc_n EXPRESSION 
[(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col2, 
type:string, comment:), ]
 POSTHOOK: Lineage: acct.aid EXPRESSION 
[(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col1, 
type:string, comment:), ]
 POSTHOOK: Lineage: acct.brn EXPRESSION 
[(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col3, 
type:string, comment:), ]
+Warning: Shuffle Join JOIN[25][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 
'Stage-2:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[22][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
 PREHOOK: query: --[HIVE-10841] (WHERE col is not null) does not work sometimes 
for queries with many JOIN statements
 explain select
   acct.ACC_N,
@@ -112,7 +114,8 @@ STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
   Stage-3 depends on stages: Stage-2
-  Stage-0 depends on stages: Stage-3
+  Stage-4 depends on stages: Stage-3
+  Stage-0 depends on stages: Stage-4
 
 STAGE PLANS:
   Stage: Stage-1
@@ -127,26 +130,46 @@ STAGE PLANS:
               Select Operator
                 Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
                 Reduce Output Operator
-                  key expressions: 4436 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: 4436 (type: int)
+                  sort order: 
                   Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
           TableScan
             alias: la
             Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: ((aid is not null and pi_id is not null) and (loan_id 
= 4436)) (type: boolean)
+              predicate: (((loan_id = 4436) 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)
                 outputColumnNames: _col1, _col2
                 Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE 
Column stats: NONE
                 Reduce Output Operator
-                  key expressions: 4436 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: 4436 (type: int)
+                  sort order: 
                   Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE 
Column stats: NONE
                   value expressions: _col1 (type: int), _col2 (type: int)
+      Reduce Operator Tree:
+        Join Operator
+          condition map:
+               Inner Join 0 to 1
+          keys:
+            0 
+            1 
+          outputColumnNames: _col2, _col3
+          Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column 
stats: NONE
+          File Output Operator
+            compressed: false
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+
+  Stage: Stage-2
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            Reduce Output Operator
+              sort order: 
+              Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
+              value expressions: _col2 (type: int), _col3 (type: int)
           TableScan
             alias: fr
             Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column 
stats: NONE
@@ -156,21 +179,17 @@ STAGE PLANS:
               Select Operator
                 Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
                 Reduce Output Operator
-                  key expressions: 4436 (type: int)
-                  sort order: +
-                  Map-reduce partition columns: 4436 (type: int)
+                  sort order: 
                   Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
-               Inner Join 0 to 2
           keys:
-            0 _col0 (type: int)
-            1 _col0 (type: int)
-            2 _col0 (type: int)
+            0 
+            1 
           outputColumnNames: _col2, _col3
-          Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column 
stats: NONE
+          Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column 
stats: NONE
           File Output Operator
             compressed: false
             table:
@@ -178,7 +197,7 @@ STAGE PLANS:
                 output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                 serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
 
-  Stage: Stage-2
+  Stage: Stage-3
     Map Reduce
       Map Operator Tree:
           TableScan
@@ -186,7 +205,7 @@ STAGE PLANS:
               key expressions: _col2 (type: int)
               sort order: +
               Map-reduce partition columns: _col2 (type: int)
-              Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE 
Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
               value expressions: _col3 (type: int)
           TableScan
             alias: a
@@ -237,7 +256,7 @@ STAGE PLANS:
                 output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
                 serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
 
-  Stage: Stage-3
+  Stage: Stage-4
     Map Reduce
       Map Operator Tree:
           TableScan
@@ -289,6 +308,8 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
+Warning: Shuffle Join JOIN[25][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 
'Stage-2:MAPRED' is a cross product
+Warning: Shuffle Join JOIN[22][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
 PREHOOK: query: select
   acct.ACC_N,
   acct.brn

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/join_grp_diff_keys.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join_grp_diff_keys.q.out 
b/ql/src/test/results/clientpositive/join_grp_diff_keys.q.out
index 29b97a0..53e33d1 100644
--- a/ql/src/test/results/clientpositive/join_grp_diff_keys.q.out
+++ b/ql/src/test/results/clientpositive/join_grp_diff_keys.q.out
@@ -59,7 +59,7 @@ STAGE PLANS:
             alias: foo
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: ((id is not null and line_id is not null) and (orders 
<> 'blah')) (type: boolean)
+              predicate: (((orders <> 'blah') and id is not null) and line_id 
is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
                 expressions: id (type: int), line_id (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/a6d9bf76/ql/src/test/results/clientpositive/lineage2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/lineage2.q.out 
b/ql/src/test/results/clientpositive/lineage2.q.out
index be0b564..66929dd 100644
--- a/ql/src/test/results/clientpositive/lineage2.q.out
+++ b/ql/src/test/results/clientpositive/lineage2.q.out
@@ -523,14 +523,14 @@ PREHOOK: Input: default@src1
 PREHOOK: Input: default@src2
 PREHOOK: Output: database:default
 PREHOOK: Output: default@dest3
-{"version":"1.0","engine":"mr","database":"default","hash":"a2c4e9a3ec678039814f5d84b1e38ce4","queryText":"create
 table dest3 as\n  select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE 
length(key) > 
1","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"(src1.key
 is not null and (length(src1.key) > 
1))","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key
 = 
src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"(src2.key2
 is not null and (length(src2.key2) > 
1))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest3.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest3.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest3.key2"},{"id":3,"vert
 
exType":"COLUMN","vertexId":"default.dest3.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]}
+{"version":"1.0","engine":"mr","database":"default","hash":"a2c4e9a3ec678039814f5d84b1e38ce4","queryText":"create
 table dest3 as\n  select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE 
length(key) > 
1","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"((length(src1.key)
 > 1) and src1.key is not 
null)","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key
 = 
src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"((length(src2.key2)
 > 1) and src2.key2 is not 
null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest3.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest3.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest3.key2"},{"id":3,"vert
 
exType":"COLUMN","vertexId":"default.dest3.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]}
 PREHOOK: query: insert overwrite table dest2
   select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src1
 PREHOOK: Input: default@src2
 PREHOOK: Output: default@dest2
-{"version":"1.0","engine":"mr","database":"default","hash":"76d84512204ddc576ad4d93f252e4358","queryText":"insert
 overwrite table dest2\n  select * from src1 JOIN src2 ON src1.key = src2.key2 
WHERE length(key) > 
3","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"(src1.key
 is not null and (length(src1.key) > 
3))","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key
 = 
src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"(src2.key2
 is not null and (length(src2.key2) > 
3))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest2.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest2.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest2.key2"},{"id":
 
3,"vertexType":"COLUMN","vertexId":"default.dest2.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]}
+{"version":"1.0","engine":"mr","database":"default","hash":"76d84512204ddc576ad4d93f252e4358","queryText":"insert
 overwrite table dest2\n  select * from src1 JOIN src2 ON src1.key = src2.key2 
WHERE length(key) > 
3","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"((length(src1.key)
 > 3) and src1.key is not 
null)","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key
 = 
src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"((length(src2.key2)
 > 3) and src2.key2 is not 
null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest2.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest2.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest2.key2"},{"id":
 
3,"vertexType":"COLUMN","vertexId":"default.dest2.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]}
 PREHOOK: query: drop table if exists dest_l1
 PREHOOK: type: DROPTABLE
 PREHOOK: query: CREATE TABLE dest_l1(key INT, value STRING) STORED AS TEXTFILE
@@ -646,7 +646,7 @@ PREHOOK: type: QUERY
 PREHOOK: Input: default@dest_l2
 PREHOOK: Input: default@dest_l3
 #### A masked pattern was here ####
-{"version":"1.0","engine":"mr","database":"default","hash":"01879c619517509d9f5b6ead998bb4bb","queryText":"select
 sum(a.c1), count(b.c1), b.c2, b.c3\nfrom dest_l2 a join dest_l3 b on (a.id = 
b.id)\nwhere a.c2 != 10 and b.c3 > 0\ngroup by a.c1, a.c2, a.id, b.c1, b.c2, 
b.c3\nhaving count(a.c2) > 0\norder by b.c3 limit 
5","edges":[{"sources":[4],"targets":[0],"expression":"sum(default.dest_l2.c1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"count(default.dest_l3.c1)","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[8,9],"targets":[0,1,2,3],"expression":"(a.id
 is not null and (a.c2 <> 
10))","edgeType":"PREDICATE"},{"sources":[8,10],"targets":[0,1,2,3],"expression":"(a.id
 = 
b.id)","edgeType":"PREDICATE"},{"sources":[10,7],"targets":[0,1,2,3],"expression":"(b.id
 is not null and (b.c3 > 
0))","edgeType":"PREDICATE"},{"sources":[9],"targets":[0,1,2,3],"expression":"(count(d
 efault.dest_l2.c2) > 
0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"c0"},{"id":1,"vertexType":"COLUMN","vertexId":"c1"},{"id":2,"vertexType":"COLUMN","vertexId":"b.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"b.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"}]}
+{"version":"1.0","engine":"mr","database":"default","hash":"01879c619517509d9f5b6ead998bb4bb","queryText":"select
 sum(a.c1), count(b.c1), b.c2, b.c3\nfrom dest_l2 a join dest_l3 b on (a.id = 
b.id)\nwhere a.c2 != 10 and b.c3 > 0\ngroup by a.c1, a.c2, a.id, b.c1, b.c2, 
b.c3\nhaving count(a.c2) > 0\norder by b.c3 limit 
5","edges":[{"sources":[4],"targets":[0],"expression":"sum(default.dest_l2.c1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"count(default.dest_l3.c1)","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[8,9],"targets":[0,1,2,3],"expression":"((a.c2
 <> 10) and a.id is not 
null)","edgeType":"PREDICATE"},{"sources":[9,10],"targets":[0,1,2,3],"expression":"(a.id
 = 
b.id)","edgeType":"PREDICATE"},{"sources":[7,10],"targets":[0,1,2,3],"expression":"((b.c3
 > 0) and b.id is not 
null)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3],"expression":"(count(d
 efault.dest_l2.c2) > 
0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"c0"},{"id":1,"vertexType":"COLUMN","vertexId":"c1"},{"id":2,"vertexType":"COLUMN","vertexId":"b.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"b.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"}]}
 1      1       s2      15
 PREHOOK: query: drop table if exists t
 PREHOOK: type: DROPTABLE
@@ -659,7 +659,7 @@ PREHOOK: Input: default@dest_l2
 PREHOOK: Input: default@dest_l3
 PREHOOK: Output: database:default
 PREHOOK: Output: default@t
-{"version":"1.0","engine":"mr","database":"default","hash":"0d2f15b494111ffe236d5be42a76fa28","queryText":"create
 table t as\nselect distinct a.c2, a.c3 from dest_l2 a\ninner join dest_l3 b on 
(a.id = b.id)\nwhere a.id > 0 and b.c3 = 
15","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1],"expression":"(a.id
 is not null and (a.id > 
0))","edgeType":"PREDICATE"},{"sources":[4,5],"targets":[0,1],"expression":"(a.id
 = 
b.id)","edgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1],"expression":"(b.id
 is not null and (b.c3 = 15) and (b.id > 
0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.t.c2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.t.c3"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":5,"verte
 
xType":"COLUMN","vertexId":"default.dest_l3.id"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]}
+{"version":"1.0","engine":"mr","database":"default","hash":"0d2f15b494111ffe236d5be42a76fa28","queryText":"create
 table t as\nselect distinct a.c2, a.c3 from dest_l2 a\ninner join dest_l3 b on 
(a.id = b.id)\nwhere a.id > 0 and b.c3 = 
15","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1],"expression":"(a.id
 > 
0)","edgeType":"PREDICATE"},{"sources":[4,5],"targets":[0,1],"expression":"(a.id
 = 
b.id)","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1],"expression":"((b.c3
 = 15) and (b.id > 
0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.t.c2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.t.c3"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.
 id"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]}
 PREHOOK: query: SELECT substr(src1.key,1,1), count(DISTINCT 
substr(src1.value,5)),
 concat(substr(src1.key,1,1),sum(substr(src1.value,5)))
 from src1

Reply via email to