hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcama...@apache.org
Subject [16/17] hive git commit: HIVE-12478: Improve Hive/Calcite Transitive Predicate inference (Jesus Camacho Rodriguez, reviewed by Laljo John Pullokkaran)
Date Wed, 27 Jan 2016 08:31:00 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/bucketsortoptimize_insert_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_6.q.out b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_6.q.out
index a7ad04c..fe32f45 100644
--- a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_6.q.out
+++ b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_6.q.out
@@ -85,7 +85,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -224,7 +224,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -376,7 +376,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -394,7 +394,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -456,7 +456,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -474,7 +474,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -516,7 +516,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -597,7 +597,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -615,7 +615,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -677,7 +677,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -695,7 +695,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -737,7 +737,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -811,7 +811,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -968,7 +968,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -1148,7 +1148,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -1166,7 +1166,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -1228,7 +1228,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -1246,7 +1246,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 84 Data size: 979 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)
@@ -1288,7 +1288,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (key2 is not null and key is not null) (type: boolean)
+              predicate: (key is not null and key2 is not null) (type: boolean)
               Statistics: Num rows: 10 Data size: 91 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), key2 (type: int), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/bucketsortoptimize_insert_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_7.q.out b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_7.q.out
index fa73acf..b5dfce3 100644
--- a/ql/src/test/results/clientpositive/bucketsortoptimize_insert_7.q.out
+++ b/ql/src/test/results/clientpositive/bucketsortoptimize_insert_7.q.out
@@ -85,7 +85,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((key = 0) or (key = 5)) and key is not null) (type: boolean)
+              predicate: (key is not null and ((key = 0) or (key = 5))) (type: boolean)
               Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/cbo_const.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_const.q.out b/ql/src/test/results/clientpositive/cbo_const.q.out
index adc5232..d6682ca 100644
--- a/ql/src/test/results/clientpositive/cbo_const.q.out
+++ b/ql/src/test/results/clientpositive/cbo_const.q.out
@@ -294,7 +294,7 @@ STAGE PLANS:
             alias: z
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Filter Operator
-              predicate: (((UDFToDouble(hr) = 14.0) and (ds = '2008-04-08')) and value is not null) (type: boolean)
+              predicate: (((ds = '2008-04-08') and (UDFToDouble(hr) = 14.0)) and value is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
                 expressions: value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/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 1b2a2ab..d4bc93c 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":"((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"}]}
+{"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"}]}
 PREHOOK: query: insert overwrite table dest2
   select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 3
 PREHOOK: type: QUERY
@@ -593,7 +593,7 @@ PREHOOK: Input: default@dept
 PREHOOK: Input: default@emp
 PREHOOK: Input: default@project
 PREHOOK: Output: default@tgt
-{"version":"1.0","engine":"mr","database":"default","hash":"f59797e0422d2e51515063374dfac361","queryText":"INSERT INTO TABLE tgt\nSELECT emd.dept_name, emd.name, emd.emp_id, emd.mgr_id, p.project_id, p.project_name\nFROM (\n  SELECT d.dept_name, em.name, em.emp_id, em.mgr_id, em.dept_id\n  FROM (\n    SELECT e.name, e.dept_id, e.emp_id emp_id, m.emp_id mgr_id\n    FROM emp e JOIN emp m ON e.emp_id = m.emp_id\n    ) em\n  JOIN dept d ON d.dept_id = em.dept_id\n  ) emd JOIN project p ON emd.dept_id = p.project_id","edges":[{"sources":[6],"targets":[0],"edgeType":"PROJECTION"},{"sources":[7],"targets":[1],"edgeType":"PROJECTION"},{"sources":[8],"targets":[2,3],"edgeType":"PROJECTION"},{"sources":[9],"targets":[4],"edgeType":"PROJECTION"},{"sources":[10],"targets":[5],"edgeType":"PROJECTION"},{"sources":[8,11],"targets":[0,1,2,3,4,5],"expression":"(e.emp_id is not null and e.dept_id is not null)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3,4,5],"expression":"(emd:em:e.emp_
 id = emd:em:m.emp_id)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3,4,5],"expression":"m.emp_id is not null","edgeType":"PREDICATE"},{"sources":[11,12,9],"targets":[0,1,2,3,4,5],"expression":"(emd:em:e.dept_id = emd:d.dept_id AND emd:em:e.dept_id = p.project_id)","edgeType":"PREDICATE"},{"sources":[12],"targets":[0,1,2,3,4,5],"expression":"d.dept_id is not null","edgeType":"PREDICATE"},{"sources":[9],"targets":[0,1,2,3,4,5],"expression":"p.project_id is not null","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.tgt.dept_name"},{"id":1,"vertexType":"COLUMN","vertexId":"default.tgt.name"},{"id":2,"vertexType":"COLUMN","vertexId":"default.tgt.emp_id"},{"id":3,"vertexType":"COLUMN","vertexId":"default.tgt.mgr_id"},{"id":4,"vertexType":"COLUMN","vertexId":"default.tgt.proj_id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.tgt.proj_name"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dept.dept_name"},{"id":7,"vertexType":"COLUMN"
 ,"vertexId":"default.emp.name"},{"id":8,"vertexType":"COLUMN","vertexId":"default.emp.emp_id"},{"id":9,"vertexType":"COLUMN","vertexId":"default.project.project_id"},{"id":10,"vertexType":"COLUMN","vertexId":"default.project.project_name"},{"id":11,"vertexType":"COLUMN","vertexId":"default.emp.dept_id"},{"id":12,"vertexType":"COLUMN","vertexId":"default.dept.dept_id"}]}
+{"version":"1.0","engine":"mr","database":"default","hash":"f59797e0422d2e51515063374dfac361","queryText":"INSERT INTO TABLE tgt\nSELECT emd.dept_name, emd.name, emd.emp_id, emd.mgr_id, p.project_id, p.project_name\nFROM (\n  SELECT d.dept_name, em.name, em.emp_id, em.mgr_id, em.dept_id\n  FROM (\n    SELECT e.name, e.dept_id, e.emp_id emp_id, m.emp_id mgr_id\n    FROM emp e JOIN emp m ON e.emp_id = m.emp_id\n    ) em\n  JOIN dept d ON d.dept_id = em.dept_id\n  ) emd JOIN project p ON emd.dept_id = p.project_id","edges":[{"sources":[6],"targets":[0],"edgeType":"PROJECTION"},{"sources":[7],"targets":[1],"edgeType":"PROJECTION"},{"sources":[8],"targets":[2,3],"edgeType":"PROJECTION"},{"sources":[9],"targets":[4],"edgeType":"PROJECTION"},{"sources":[10],"targets":[5],"edgeType":"PROJECTION"},{"sources":[8,11],"targets":[0,1,2,3,4,5],"expression":"(e.emp_id is not null and e.dept_id is not null and e.dept_id is not null)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3,4,5],"e
 xpression":"(emd:em:e.emp_id = emd:em:m.emp_id)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3,4,5],"expression":"m.emp_id is not null","edgeType":"PREDICATE"},{"sources":[11,12,9],"targets":[0,1,2,3,4,5],"expression":"(emd:em:e.dept_id = emd:d.dept_id AND emd:em:e.dept_id = p.project_id)","edgeType":"PREDICATE"},{"sources":[12],"targets":[0,1,2,3,4,5],"expression":"d.dept_id is not null","edgeType":"PREDICATE"},{"sources":[9],"targets":[0,1,2,3,4,5],"expression":"p.project_id is not null","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.tgt.dept_name"},{"id":1,"vertexType":"COLUMN","vertexId":"default.tgt.name"},{"id":2,"vertexType":"COLUMN","vertexId":"default.tgt.emp_id"},{"id":3,"vertexType":"COLUMN","vertexId":"default.tgt.mgr_id"},{"id":4,"vertexType":"COLUMN","vertexId":"default.tgt.proj_id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.tgt.proj_name"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dept.dept_name"},{"i
 d":7,"vertexType":"COLUMN","vertexId":"default.emp.name"},{"id":8,"vertexType":"COLUMN","vertexId":"default.emp.emp_id"},{"id":9,"vertexType":"COLUMN","vertexId":"default.project.project_id"},{"id":10,"vertexType":"COLUMN","vertexId":"default.project.project_name"},{"id":11,"vertexType":"COLUMN","vertexId":"default.emp.dept_id"},{"id":12,"vertexType":"COLUMN","vertexId":"default.dept.dept_id"}]}
 PREHOOK: query: drop table if exists dest_l2
 PREHOOK: type: DROPTABLE
 PREHOOK: query: create table dest_l2 (id int, c1 tinyint, c2 int, c3 bigint) 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.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"}]}
+{"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"}]}
 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 > 0) and a.id is not null)","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) and b.id is not null)","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 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"}]}
 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/48b201ee/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 08c0aeb..a1c4a22 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_linenumber = 1) and l_orderkey is not null) (type: boolean)
+              predicate: (l_orderkey is not null and (l_linenumber = 1)) (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_linenumber = 1)) and l_orderkey is not null) (type: boolean)
+              predicate: (((l_shipmode = 'AIR') and l_orderkey is not null) and (l_linenumber = 1)) (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/48b201ee/ql/src/test/results/clientpositive/correlationoptimizer1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer1.q.out b/ql/src/test/results/clientpositive/correlationoptimizer1.q.out
index 38764d6..efd681e 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer1.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer1.q.out
@@ -2811,7 +2811,7 @@ STAGE PLANS:
             alias: x
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (value is not null and key is not null) (type: boolean)
+              predicate: (key is not null and value is not null) (type: boolean)
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -2826,7 +2826,7 @@ STAGE PLANS:
             alias: y
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (value is not null and key is not null) (type: boolean)
+              predicate: (key is not null and value 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)
@@ -2963,7 +2963,7 @@ STAGE PLANS:
             alias: x
             Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (value is not null and key is not null) (type: boolean)
+              predicate: (key is not null and value is not null) (type: boolean)
               Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -2978,7 +2978,7 @@ STAGE PLANS:
             alias: y
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (value is not null and key is not null) (type: boolean)
+              predicate: (key is not null and value 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/48b201ee/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer10.q.out b/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
index 6bac698..e210c7f 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
@@ -748,7 +748,7 @@ STAGE PLANS:
             alias: xx
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) > 180.0) and (UDFToDouble(key) < 200.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -763,7 +763,7 @@ STAGE PLANS:
             alias: xx
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) > 180.0) and (UDFToDouble(key) < 200.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -802,7 +802,7 @@ STAGE PLANS:
             alias: xx
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) > 180.0) and (UDFToDouble(key) < 200.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -921,7 +921,7 @@ STAGE PLANS:
             alias: xx
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) > 180.0) and (UDFToDouble(key) < 200.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -937,7 +937,7 @@ STAGE PLANS:
             alias: xx
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) > 180.0) and (UDFToDouble(key) < 200.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -952,7 +952,7 @@ STAGE PLANS:
             alias: xx
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) > 180.0) and (UDFToDouble(key) < 200.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 200.0) and (UDFToDouble(key) > 180.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/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 61b7bcb..048f63b 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 (c1 < 120)) and c3 is not null) (type: boolean)
+              predicate: (((c2 > 100) and c3 is not null) and (c1 < 120)) (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/48b201ee/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 368a114..ba54b87 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: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean)
+              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (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: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean)
+              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (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: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean)
+              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (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/48b201ee/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 104a97a..b687616 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 (c1 < 120)) and c3 is not null) (type: boolean)
+              predicate: (((c2 > 100) and c3 is not null) and (c1 < 120)) (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 (c1 < 120)) and c3 is not null) (type: boolean)
+              predicate: (((c2 > 100) and c3 is not null) and (c1 < 120)) (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/48b201ee/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 743865e..a8be151 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_moy = 3)) and d_date_sk is not null) (type: boolean)
+              predicate: (((d_year = 1999) and d_date_sk is not null) and (d_moy = 3)) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
                 expressions: d_date_sk (type: int)
@@ -1088,7 +1088,7 @@ STAGE PLANS:
               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)
-                outputColumnNames: _col0, _col1, _col2, _col3
+                outputColumnNames: _col1, _col2, _col4, _col5
                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                 File Output Operator
                   compressed: true
@@ -1102,30 +1102,30 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             Reduce Output Operator
-              key expressions: _col1 (type: int), _col0 (type: int)
+              key expressions: _col2 (type: int), _col1 (type: int)
               sort order: ++
-              Map-reduce partition columns: _col1 (type: int), _col0 (type: int)
+              Map-reduce partition columns: _col2 (type: int), _col1 (type: int)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-              value expressions: _col2 (type: double), _col3 (type: double)
+              value expressions: _col4 (type: double), _col5 (type: double)
           TableScan
             Reduce Output Operator
               key expressions: _col2 (type: int), _col1 (type: int)
               sort order: ++
               Map-reduce partition columns: _col2 (type: int), _col1 (type: int)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-              value expressions: _col3 (type: int), _col4 (type: double), _col5 (type: double)
+              value expressions: _col4 (type: double), _col5 (type: double)
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
-            0 _col1 (type: int), _col0 (type: int)
+            0 _col2 (type: int), _col1 (type: int)
             1 _col2 (type: int), _col1 (type: int)
-          outputColumnNames: _col0, _col1, _col2, _col3, _col5, _col6, _col7, _col8, _col9
+          outputColumnNames: _col1, _col2, _col4, _col5, _col7, _col8, _col10, _col11
           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
           Select Operator
-            expressions: _col0 (type: int), _col1 (type: int), _col2 (type: double), _col3 (type: double), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col8 (type: double), _col9 (type: double)
-            outputColumnNames: _col0, _col1, _col3, _col4, _col5, _col6, _col7, _col8, _col9
+            expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), _col5 (type: double), _col7 (type: int), _col8 (type: int), _col10 (type: double), _col11 (type: double)
+            outputColumnNames: _col0, _col1, _col3, _col4, _col5, _col6, _col8, _col9
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             File Output Operator
               compressed: true
@@ -1139,13 +1139,13 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             Reduce Output Operator
-              key expressions: _col0 (type: int), _col1 (type: int), 3 (type: int), _col3 (type: double), _col4 (type: double), _col7 (type: int), _col8 (type: double), _col9 (type: double)
+              key expressions: _col0 (type: int), _col1 (type: int), 3 (type: int), _col3 (type: double), _col4 (type: double), 4 (type: int), _col8 (type: double), _col9 (type: double)
               sort order: ++++++++
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               value expressions: _col5 (type: int), _col6 (type: int)
       Reduce Operator Tree:
         Select Operator
-          expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: int), 3 (type: int), KEY.reducesinkkey3 (type: double), KEY.reducesinkkey4 (type: double), VALUE._col0 (type: int), VALUE._col1 (type: int), KEY.reducesinkkey5 (type: int), KEY.reducesinkkey6 (type: double), KEY.reducesinkkey7 (type: double)
+          expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: int), 3 (type: int), KEY.reducesinkkey3 (type: double), KEY.reducesinkkey4 (type: double), VALUE._col0 (type: int), VALUE._col1 (type: int), 4 (type: int), KEY.reducesinkkey6 (type: double), KEY.reducesinkkey7 (type: double)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
           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_moy = 4) and (d_year = 1999)) and d_date_sk is not null) (type: boolean)
+              predicate: (((d_year = 1999) and d_date_sk is not null) and (d_moy = 4)) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
                 expressions: d_date_sk (type: int)
@@ -1283,12 +1283,12 @@ STAGE PLANS:
           outputColumnNames: _col2, _col4, _col5, _col6
           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
           Select Operator
-            expressions: _col4 (type: int), _col5 (type: int), _col6 (type: string), 4 (type: int), _col2 (type: int)
-            outputColumnNames: _col4, _col5, _col6, _col9, _col2
+            expressions: _col6 (type: string), _col5 (type: int), _col4 (type: int), _col2 (type: int)
+            outputColumnNames: _col0, _col1, _col2, _col4
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Group By Operator
-              aggregations: stddev_samp(_col2), avg(_col2)
-              keys: _col4 (type: int), _col5 (type: int), _col6 (type: string), _col9 (type: int)
+              aggregations: avg(_col4), stddev_samp(_col4)
+              keys: _col0 (type: string), _col1 (type: int), _col2 (type: int), 4 (type: int)
               mode: hash
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
@@ -1304,28 +1304,28 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             Reduce Output Operator
-              key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int)
+              key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int), 4 (type: int)
               sort order: ++++
-              Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int)
+              Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int), 4 (type: int)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
-              value expressions: _col4 (type: struct<count:bigint,sum:double,variance:double>), _col5 (type: struct<count:bigint,sum:double,input:int>)
+              value expressions: _col4 (type: struct<count:bigint,sum:double,input:int>), _col5 (type: struct<count:bigint,sum:double,variance:double>)
       Reduce Operator Tree:
         Group By Operator
-          aggregations: stddev_samp(VALUE._col0), avg(VALUE._col1)
-          keys: KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: int)
+          aggregations: avg(VALUE._col0), stddev_samp(VALUE._col1)
+          keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int), 4 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
           Select Operator
-            expressions: _col1 (type: int), _col0 (type: int), _col3 (type: int), _col4 (type: double), _col5 (type: double)
-            outputColumnNames: _col1, _col2, _col3, _col4, _col5
+            expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), _col5 (type: double)
+            outputColumnNames: _col1, _col2, _col4, _col5
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             Filter Operator
-              predicate: (CASE (_col5) WHEN (0) THEN (0) ELSE ((_col4 / _col5)) END > 1.0) (type: boolean)
+              predicate: (CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
-                expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: double), CASE (_col5) WHEN (0) THEN (null) ELSE ((_col4 / _col5)) END (type: double)
-                outputColumnNames: _col1, _col2, _col3, _col4, _col5
+                expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), CASE (_col4) WHEN (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
                   compressed: true

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/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 5e0edbc..1c3a5ab 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 <> '') and key is not null) and value is not null) (type: boolean)
+              predicate: ((value is not null 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)
@@ -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 <> '') and key is not null) and value is not null) (type: boolean)
+              predicate: ((value is not null 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)
@@ -317,7 +317,7 @@ STAGE PLANS:
                Inner Join 0 to 1
           keys:
             0 UDFToDouble(_col0) (type: double), _col0 (type: string)
-            1 UDFToDouble(_col1) (type: double), _col0 (type: string)
+            1 UDFToDouble(1) (type: double), _col0 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col5
           Statistics: Num rows: 22 Data size: 288 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
@@ -419,7 +419,7 @@ STAGE PLANS:
             alias: f
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((value <> '') and key is not null) and value is not null) and ((value = '2008-04-10') or (value = '2008-04-08'))) (type: boolean)
+              predicate: (((key is not null and ((value = '2008-04-10') or (value = '2008-04-08'))) and value is not null) and (value <> '')) (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/48b201ee/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 53e9031..c17b48a 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: ((value is not null and (value <> '')) and key is not null) (type: boolean)
+              predicate: ((key is not null and value is not null) and (value <> '')) (type: boolean)
               Statistics: Num rows: 25 Data size: 211 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/groupby_position.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_position.q.out b/ql/src/test/results/clientpositive/groupby_position.q.out
index c2566f2..57be001 100644
--- a/ql/src/test/results/clientpositive/groupby_position.q.out
+++ b/ql/src/test/results/clientpositive/groupby_position.q.out
@@ -647,7 +647,7 @@ STAGE PLANS:
             alias: src1
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 25.0)) and (UDFToDouble(key) < 20.0)) and (UDFToDouble(key) > 10.0)) (type: boolean)
+              predicate: ((((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 25.0)) and (UDFToDouble(key) > 10.0)) and (UDFToDouble(key) < 20.0)) (type: boolean)
               Statistics: Num rows: 6 Data size: 63 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 keys: key (type: string), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/groupby_ppd.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_ppd.q.out b/ql/src/test/results/clientpositive/groupby_ppd.q.out
index d17c4b6..6164a26 100644
--- a/ql/src/test/results/clientpositive/groupby_ppd.q.out
+++ b/ql/src/test/results/clientpositive/groupby_ppd.q.out
@@ -28,23 +28,23 @@ STAGE PLANS:
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
                 expressions: foo (type: int)
-                outputColumnNames: _col0
+                outputColumnNames: _col1
                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                 Union
                   Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                   Select Operator
-                    expressions: _col0 (type: int)
-                    outputColumnNames: _col1
+                    expressions: 1 (type: int), _col1 (type: int)
+                    outputColumnNames: _col0, _col1
                     Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Group By Operator
-                      keys: 1 (type: int), _col1 (type: int)
+                      keys: _col0 (type: int), _col1 (type: int)
                       mode: hash
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Reduce Output Operator
-                        key expressions: 1 (type: int), _col1 (type: int)
+                        key expressions: _col0 (type: int), _col1 (type: int)
                         sort order: ++
-                        Map-reduce partition columns: 1 (type: int), _col1 (type: int)
+                        Map-reduce partition columns: _col0 (type: int), _col1 (type: int)
                         Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
           TableScan
             alias: c
@@ -54,32 +54,32 @@ STAGE PLANS:
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
               Select Operator
                 expressions: foo (type: int)
-                outputColumnNames: _col0
+                outputColumnNames: _col1
                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                 Union
                   Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                   Select Operator
-                    expressions: _col0 (type: int)
-                    outputColumnNames: _col1
+                    expressions: 1 (type: int), _col1 (type: int)
+                    outputColumnNames: _col0, _col1
                     Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                     Group By Operator
-                      keys: 1 (type: int), _col1 (type: int)
+                      keys: _col0 (type: int), _col1 (type: int)
                       mode: hash
                       outputColumnNames: _col0, _col1
                       Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                       Reduce Output Operator
-                        key expressions: 1 (type: int), _col1 (type: int)
+                        key expressions: _col0 (type: int), _col1 (type: int)
                         sort order: ++
-                        Map-reduce partition columns: 1 (type: int), _col1 (type: int)
+                        Map-reduce partition columns: _col0 (type: int), _col1 (type: int)
                         Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
       Reduce Operator Tree:
         Group By Operator
-          keys: 1 (type: int), KEY._col1 (type: int)
+          keys: KEY._col0 (type: int), KEY._col1 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1
           Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
           Select Operator
-            expressions: _col1 (type: int), 1 (type: int)
+            expressions: _col1 (type: int), _col0 (type: int)
             outputColumnNames: _col0, _col1
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
             File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/index_auto_mult_tables.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/index_auto_mult_tables.q.out b/ql/src/test/results/clientpositive/index_auto_mult_tables.q.out
index 8c71925..b40c7db 100644
--- a/ql/src/test/results/clientpositive/index_auto_mult_tables.q.out
+++ b/ql/src/test/results/clientpositive/index_auto_mult_tables.q.out
@@ -22,7 +22,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) (type: boolean)
+              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
               Statistics: Num rows: 6 Data size: 63 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -220,9 +220,9 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: default__src_src_index_bitmap__
-            filterExpr: (((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) and (not EWAH_BITMAP_EMPTY(_bitmaps))) (type: boolean)
+            filterExpr: (((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) and (not EWAH_BITMAP_EMPTY(_bitmaps))) (type: boolean)
             Filter Operator
-              predicate: (((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) and (not EWAH_BITMAP_EMPTY(_bitmaps))) (type: boolean)
+              predicate: (((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) and (not EWAH_BITMAP_EMPTY(_bitmaps))) (type: boolean)
               Select Operator
                 expressions: _bucketname (type: string), _offset (type: bigint)
                 outputColumnNames: _bucketname, _offset
@@ -260,10 +260,10 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            filterExpr: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) (type: boolean)
+            filterExpr: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) (type: boolean)
+              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
               Statistics: Num rows: 6 Data size: 63 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/48b201ee/ql/src/test/results/clientpositive/index_auto_mult_tables_compact.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/index_auto_mult_tables_compact.q.out b/ql/src/test/results/clientpositive/index_auto_mult_tables_compact.q.out
index b3e6989..8b395db 100644
--- a/ql/src/test/results/clientpositive/index_auto_mult_tables_compact.q.out
+++ b/ql/src/test/results/clientpositive/index_auto_mult_tables_compact.q.out
@@ -22,7 +22,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) (type: boolean)
+              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
               Statistics: Num rows: 6 Data size: 63 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -227,9 +227,9 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: default__src_src_index_compact__
-            filterExpr: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) (type: boolean)
+            filterExpr: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
             Filter Operator
-              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) (type: boolean)
+              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
               Select Operator
                 expressions: _bucketname (type: string), _offsets (type: array<bigint>)
                 outputColumnNames: _col0, _col1
@@ -260,10 +260,10 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            filterExpr: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) (type: boolean)
+            filterExpr: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 70.0)) (type: boolean)
+              predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
               Statistics: Num rows: 6 Data size: 63 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/48b201ee/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 3cc1d7e..793af78 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: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and value is not null) (type: boolean)
+              predicate: ((value is not null and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (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: (((UDFToDouble(key) < 90.0) and (UDFToDouble(key) > 70.0)) and value is not null) (type: boolean)
+              predicate: ((value is not null and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (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: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and value is not null) (type: boolean)
+            filterExpr: ((value is not null and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (type: boolean)
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and value is not null) (type: boolean)
+              predicate: ((value is not null and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (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: (((UDFToDouble(key) < 90.0) and (UDFToDouble(key) > 70.0)) and value is not null) (type: boolean)
+            filterExpr: ((value is not null and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((UDFToDouble(key) < 90.0) and (UDFToDouble(key) > 70.0)) and value is not null) (type: boolean)
+              predicate: ((value is not null and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -230,9 +230,9 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: default__src_src_index__
-            filterExpr: (((UDFToDouble(key) < 90.0) and (UDFToDouble(key) > 70.0)) and (not EWAH_BITMAP_EMPTY(_bitmaps))) (type: boolean)
+            filterExpr: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and (not EWAH_BITMAP_EMPTY(_bitmaps))) (type: boolean)
             Filter Operator
-              predicate: (((UDFToDouble(key) < 90.0) and (UDFToDouble(key) > 70.0)) and (not EWAH_BITMAP_EMPTY(_bitmaps))) (type: boolean)
+              predicate: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and (not EWAH_BITMAP_EMPTY(_bitmaps))) (type: boolean)
               Select Operator
                 expressions: _bucketname (type: string), _offset (type: bigint)
                 outputColumnNames: _bucketname, _offset

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/index_bitmap3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/index_bitmap3.q.out b/ql/src/test/results/clientpositive/index_bitmap3.q.out
index a8eecb5..ed237bb 100644
--- a/ql/src/test/results/clientpositive/index_bitmap3.q.out
+++ b/ql/src/test/results/clientpositive/index_bitmap3.q.out
@@ -115,7 +115,7 @@ STAGE PLANS:
             alias: default__src_src1_index__
             Statistics: Num rows: 500 Data size: 46311 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((UDFToDouble(key) = 0.0) and _offset is not null) and _bucketname is not null) (type: boolean)
+              predicate: (((UDFToDouble(key) = 0.0) and _bucketname is not null) and _offset is not null) (type: boolean)
               Statistics: Num rows: 250 Data size: 23155 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: _bucketname (type: string), _offset (type: bigint), _bitmaps (type: array<bigint>)
@@ -131,7 +131,7 @@ STAGE PLANS:
             alias: default__src_src2_index__
             Statistics: Num rows: 500 Data size: 48311 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((value = 'val_0') and _offset is not null) and _bucketname is not null) (type: boolean)
+              predicate: (((value = 'val_0') and _bucketname is not null) and _offset is not null) (type: boolean)
               Statistics: Num rows: 250 Data size: 24155 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: _bucketname (type: string), _offset (type: bigint), _bitmaps (type: array<bigint>)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/index_bitmap_auto.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/index_bitmap_auto.q.out b/ql/src/test/results/clientpositive/index_bitmap_auto.q.out
index d1fd59c..2b6bb0c 100644
--- a/ql/src/test/results/clientpositive/index_bitmap_auto.q.out
+++ b/ql/src/test/results/clientpositive/index_bitmap_auto.q.out
@@ -134,7 +134,7 @@ STAGE PLANS:
             alias: default__src_src1_index__
             Statistics: Num rows: 500 Data size: 46311 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((UDFToDouble(key) = 0.0) and _offset is not null) and _bucketname is not null) (type: boolean)
+              predicate: (((UDFToDouble(key) = 0.0) and _bucketname is not null) and _offset is not null) (type: boolean)
               Statistics: Num rows: 250 Data size: 23155 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: _bucketname (type: string), _offset (type: bigint), _bitmaps (type: array<bigint>)
@@ -150,7 +150,7 @@ STAGE PLANS:
             alias: default__src_src2_index__
             Statistics: Num rows: 500 Data size: 48311 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((value = 'val_0') and _offset is not null) and _bucketname is not null) (type: boolean)
+              predicate: (((value = 'val_0') and _bucketname is not null) and _offset is not null) (type: boolean)
               Statistics: Num rows: 250 Data size: 24155 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: _bucketname (type: string), _offset (type: bigint), _bitmaps (type: array<bigint>)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/join12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join12.q.out b/ql/src/test/results/clientpositive/join12.q.out
index 8217c86..87b2a8e 100644
--- a/ql/src/test/results/clientpositive/join12.q.out
+++ b/ql/src/test/results/clientpositive/join12.q.out
@@ -66,17 +66,17 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (UDFToDouble(key) < 100.0) (type: boolean)
-              Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((UDFToDouble(key) < 100.0) and (UDFToDouble(key) < 80.0)) (type: boolean)
+              Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
       Reduce Operator Tree:
         Join Operator
@@ -88,14 +88,14 @@ STAGE PLANS:
             1 _col0 (type: string)
             2 _col0 (type: string)
           outputColumnNames: _col0, _col3
-          Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 121 Data size: 1284 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: _col0 (type: string), _col3 (type: string)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 121 Data size: 1284 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 121 Data size: 1284 Basic stats: COMPLETE Column stats: NONE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/join16.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join16.q.out b/ql/src/test/results/clientpositive/join16.q.out
index 244eb46..3e11387 100644
--- a/ql/src/test/results/clientpositive/join16.q.out
+++ b/ql/src/test/results/clientpositive/join16.q.out
@@ -29,7 +29,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((UDFToDouble(value) < 200.0) and (UDFToDouble(key) > 20.0)) and (UDFToDouble(key) > 10.0)) (type: boolean)
+              predicate: (((UDFToDouble(key) > 10.0) and (UDFToDouble(key) > 20.0)) and (UDFToDouble(value) < 200.0)) (type: boolean)
               Statistics: Num rows: 18 Data size: 191 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/48b201ee/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 e2c2b1a..f1bf494 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: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean)
+              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (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/48b201ee/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 663642c..3ff41ea 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: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean)
+              predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (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/48b201ee/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 6e09e38..4f9e2a9 100644
--- a/ql/src/test/results/clientpositive/join42.q.out
+++ b/ql/src/test/results/clientpositive/join42.q.out
@@ -135,7 +135,7 @@ STAGE PLANS:
             alias: la
             Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((loan_id = 4436) and aid is not null) and pi_id is not null) (type: boolean)
+              predicate: ((aid is not null and pi_id is not null) and (loan_id = 4436)) (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)
@@ -207,7 +207,7 @@ STAGE PLANS:
             alias: acct
             Statistics: Num rows: 3 Data size: 31 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (brn is not null and aid is not null) (type: boolean)
+              predicate: (aid is not null and brn is not null) (type: boolean)
               Statistics: Num rows: 3 Data size: 31 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: aid (type: int), acc_n (type: int), brn (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/join43.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join43.q.out b/ql/src/test/results/clientpositive/join43.q.out
index b5006fa..c5b79f4 100644
--- a/ql/src/test/results/clientpositive/join43.q.out
+++ b/ql/src/test/results/clientpositive/join43.q.out
@@ -351,7 +351,7 @@ STAGE PLANS:
             alias: events
             Statistics: Num rows: 6 Data size: 79 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (time is not null and s is not null) (type: boolean)
+              predicate: (s is not null and time is not null) (type: boolean)
               Statistics: Num rows: 6 Data size: 79 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: s (type: string), time (type: int)
@@ -566,7 +566,7 @@ STAGE PLANS:
             alias: events
             Statistics: Num rows: 6 Data size: 79 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (time is not null and s is not null) (type: boolean)
+              predicate: (s is not null and time is not null) (type: boolean)
               Statistics: Num rows: 6 Data size: 79 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: s (type: string), st2 (type: string), n (type: int), time (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/48b201ee/ql/src/test/results/clientpositive/join_alt_syntax.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join_alt_syntax.q.out b/ql/src/test/results/clientpositive/join_alt_syntax.q.out
index 1c7f159..ee7c1bc 100644
--- a/ql/src/test/results/clientpositive/join_alt_syntax.q.out
+++ b/ql/src/test/results/clientpositive/join_alt_syntax.q.out
@@ -379,9 +379,9 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: int), _col1 (type: string)
+                  key expressions: _col1 (type: string), _col0 (type: int)
                   sort order: ++
-                  Map-reduce partition columns: _col0 (type: int), _col1 (type: string)
+                  Map-reduce partition columns: _col1 (type: string), _col0 (type: int)
                   Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
           TableScan
             alias: p1
@@ -394,17 +394,17 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
-                  key expressions: _col0 (type: int), _col1 (type: string)
+                  key expressions: _col1 (type: string), _col0 (type: int)
                   sort order: ++
-                  Map-reduce partition columns: _col0 (type: int), _col1 (type: string)
+                  Map-reduce partition columns: _col1 (type: string), _col0 (type: int)
                   Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
                Inner Join 0 to 1
           keys:
-            0 _col0 (type: int), _col1 (type: string)
-            1 _col0 (type: int), _col1 (type: string)
+            0 _col1 (type: string), _col0 (type: int)
+            1 _col1 (type: string), _col0 (type: int)
           outputColumnNames: _col0, _col1, _col3
           Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE
           File Output Operator


Mime
View raw message