http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppd_gby_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_gby_join.q.out 
b/ql/src/test/results/clientpositive/ppd_gby_join.q.out
index 8519174..75d0a62 100644
--- a/ql/src/test/results/clientpositive/ppd_gby_join.q.out
+++ b/ql/src/test/results/clientpositive/ppd_gby_join.q.out
@@ -31,7 +31,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key < '400') and (key > '20') and ((value < 
'val_50') or (key > '2')) and (key <> '4')) (type: boolean)
+              predicate: (((value < 'val_50') or (key > '2')) and (key < 
'400') and (key <> '4') and (key > '20')) (type: boolean)
               Statistics: Num rows: 36 Data size: 382 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -67,7 +67,7 @@ STAGE PLANS:
           outputColumnNames: _col0, _col1
           Statistics: Num rows: 60 Data size: 642 Basic stats: COMPLETE Column 
stats: NONE
           Filter Operator
-            predicate: ((_col1 > '50') or (_col0 < '50')) (type: boolean)
+            predicate: ((_col0 < '50') or (_col1 > '50')) (type: boolean)
             Statistics: Num rows: 40 Data size: 428 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: _col0 (type: string)
@@ -301,7 +301,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key < '400') and (key > '20') and ((value < 
'val_50') or (key > '2')) and (key <> '4')) (type: boolean)
+              predicate: (((value < 'val_50') or (key > '2')) and (key < 
'400') and (key <> '4') and (key > '20')) (type: boolean)
               Statistics: Num rows: 36 Data size: 382 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -337,7 +337,7 @@ STAGE PLANS:
           outputColumnNames: _col0, _col1
           Statistics: Num rows: 60 Data size: 642 Basic stats: COMPLETE Column 
stats: NONE
           Filter Operator
-            predicate: ((_col1 > '50') or (_col0 < '50')) (type: boolean)
+            predicate: ((_col0 < '50') or (_col1 > '50')) (type: boolean)
             Statistics: Num rows: 40 Data size: 428 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: _col0 (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppd_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_join.q.out 
b/ql/src/test/results/clientpositive/ppd_join.q.out
index 0d09633..02aa5c2 100644
--- a/ql/src/test/results/clientpositive/ppd_join.q.out
+++ b/ql/src/test/results/clientpositive/ppd_join.q.out
@@ -28,7 +28,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key < '400') and (key > '20') and ((value < 
'val_50') or (key > '2')) and (key <> '4')) (type: boolean)
+              predicate: (((value < 'val_50') or (key > '2')) and (key < 
'400') and (key <> '4') and (key > '20')) (type: boolean)
               Statistics: Num rows: 36 Data size: 382 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -65,7 +65,7 @@ STAGE PLANS:
           outputColumnNames: _col0, _col1, _col2
           Statistics: Num rows: 60 Data size: 642 Basic stats: COMPLETE Column 
stats: NONE
           Filter Operator
-            predicate: ((_col1 > '50') or (_col0 < '50')) (type: boolean)
+            predicate: ((_col0 < '50') or (_col1 > '50')) (type: boolean)
             Statistics: Num rows: 40 Data size: 428 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: _col0 (type: string), _col2 (type: string)
@@ -553,7 +553,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key < '400') and (key > '20') and ((value < 
'val_50') or (key > '2')) and (key <> '4')) (type: boolean)
+              predicate: (((value < 'val_50') or (key > '2')) and (key < 
'400') and (key <> '4') and (key > '20')) (type: boolean)
               Statistics: Num rows: 36 Data size: 382 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -590,7 +590,7 @@ STAGE PLANS:
           outputColumnNames: _col0, _col1, _col2
           Statistics: Num rows: 60 Data size: 642 Basic stats: COMPLETE Column 
stats: NONE
           Filter Operator
-            predicate: ((_col1 > '50') or (_col0 < '50')) (type: boolean)
+            predicate: ((_col0 < '50') or (_col1 > '50')) (type: boolean)
             Statistics: Num rows: 40 Data size: 428 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: _col0 (type: string), _col2 (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppd_join2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_join2.q.out 
b/ql/src/test/results/clientpositive/ppd_join2.q.out
index 279435a..146478a 100644
--- a/ql/src/test/results/clientpositive/ppd_join2.q.out
+++ b/ql/src/test/results/clientpositive/ppd_join2.q.out
@@ -35,7 +35,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '305') and (key <> '302') and (key < '400') 
and (key <> '14') and (key <> '311')) (type: boolean)
+              predicate: ((key < '400') and (key <> '14') and (key <> '302') 
and (key <> '305') and (key <> '311')) (type: boolean)
               Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -51,7 +51,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '302') and (key < '400') and (key <> '305') 
and (key <> '311') and ((value <> 'val_50') or (key > '1')) and (key <> '14') 
and value is not null) (type: boolean)
+              predicate: (((value <> 'val_50') or (key > '1')) and (key < 
'400') and (key <> '14') and (key <> '302') and (key <> '305') and (key <> 
'311') and value is not null) (type: boolean)
               Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -1715,7 +1715,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '305') and (key <> '302') and (key < '400') 
and (key <> '14') and (key <> '311')) (type: boolean)
+              predicate: ((key < '400') and (key <> '14') and (key <> '302') 
and (key <> '305') and (key <> '311')) (type: boolean)
               Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -1731,7 +1731,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '302') and (key < '400') and (key <> '305') 
and (key <> '311') and ((value <> 'val_50') or (key > '1')) and (key <> '14') 
and value is not null) (type: boolean)
+              predicate: (((value <> 'val_50') or (key > '1')) and (key < 
'400') and (key <> '14') and (key <> '302') and (key <> '305') and (key <> 
'311') and value is not null) (type: boolean)
               Statistics: Num rows: 166 Data size: 1763 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/c5b3ccc4/ql/src/test/results/clientpositive/ppd_join3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_join3.q.out 
b/ql/src/test/results/clientpositive/ppd_join3.q.out
index cdf887e..4a53e61 100644
--- a/ql/src/test/results/clientpositive/ppd_join3.q.out
+++ b/ql/src/test/results/clientpositive/ppd_join3.q.out
@@ -34,7 +34,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '13') and (key <> '11') and (key < '400') 
and (key <> '12') and (key <> '1') and (key > '0') and (key <> '4')) (type: 
boolean)
+              predicate: ((key < '400') and (key <> '1') and (key <> '11') and 
(key <> '12') and (key <> '13') and (key <> '4') and (key > '0')) (type: 
boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -49,7 +49,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '11') and (key < '400') and (key <> '12') 
and (key <> '13') and (key > '0') and ((value <> 'val_500') or (key > '1')) and 
(key <> '4') and (key <> '1')) (type: boolean)
+              predicate: (((value <> 'val_500') or (key > '1')) and (key < 
'400') and (key <> '1') and (key <> '11') and (key <> '12') and (key <> '13') 
and (key <> '4') and (key > '0')) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -64,7 +64,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '12') and (key <> '11') and (key < '400') 
and (key <> '13') and (key <> '4') and (key > '0') and (key <> '1')) (type: 
boolean)
+              predicate: ((key < '400') and (key <> '1') and (key <> '11') and 
(key <> '12') and (key <> '13') and (key <> '4') and (key > '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)
@@ -88,7 +88,7 @@ STAGE PLANS:
           outputColumnNames: _col1, _col2, _col3
           Statistics: Num rows: 121 Data size: 1284 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: ((_col2 > '10') or (_col1 <> '10')) (type: boolean)
+            predicate: ((_col1 <> '10') or (_col2 > '10')) (type: boolean)
             Statistics: Num rows: 121 Data size: 1284 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: _col1 (type: string), _col3 (type: string)
@@ -1745,7 +1745,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '13') and (key <> '11') and (key < '400') 
and (key <> '12') and (key <> '1') and (key > '0') and (key <> '4')) (type: 
boolean)
+              predicate: ((key < '400') and (key <> '1') and (key <> '11') and 
(key <> '12') and (key <> '13') and (key <> '4') and (key > '0')) (type: 
boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -1760,7 +1760,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '11') and (key < '400') and (key <> '12') 
and (key <> '13') and (key > '0') and ((value <> 'val_500') or (key > '1')) and 
(key <> '4') and (key <> '1')) (type: boolean)
+              predicate: (((value <> 'val_500') or (key > '1')) and (key < 
'400') and (key <> '1') and (key <> '11') and (key <> '12') and (key <> '13') 
and (key <> '4') and (key > '0')) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -1775,7 +1775,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key <> '12') and (key <> '11') and (key < '400') 
and (key <> '13') and (key <> '4') and (key > '0') and (key <> '1')) (type: 
boolean)
+              predicate: ((key < '400') and (key <> '1') and (key <> '11') and 
(key <> '12') and (key <> '13') and (key <> '4') and (key > '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)
@@ -1799,7 +1799,7 @@ STAGE PLANS:
           outputColumnNames: _col1, _col2, _col3
           Statistics: Num rows: 121 Data size: 1284 Basic stats: COMPLETE 
Column stats: NONE
           Filter Operator
-            predicate: ((_col2 > '10') or (_col1 <> '10')) (type: boolean)
+            predicate: ((_col1 <> '10') or (_col2 > '10')) (type: boolean)
             Statistics: Num rows: 121 Data size: 1284 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: _col1 (type: string), _col3 (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppd_join4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_join4.q.out 
b/ql/src/test/results/clientpositive/ppd_join4.q.out
index 7557ced..47cea8b 100644
--- a/ql/src/test/results/clientpositive/ppd_join4.q.out
+++ b/ql/src/test/results/clientpositive/ppd_join4.q.out
@@ -56,7 +56,7 @@ STAGE PLANS:
             alias: test_tbl
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: ((name = 'c') and (id = 'a')) (type: boolean)
+              predicate: ((id = 'a') and (name = 'c')) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
                 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL 
Column stats: NONE

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppd_join5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_join5.q.out 
b/ql/src/test/results/clientpositive/ppd_join5.q.out
index 1cd3a7a..ca17699 100644
--- a/ql/src/test/results/clientpositive/ppd_join5.q.out
+++ b/ql/src/test/results/clientpositive/ppd_join5.q.out
@@ -253,7 +253,7 @@ STAGE PLANS:
           outputColumnNames: _col0, _col1, _col2, _col4
           Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column 
stats: NONE
           Filter Operator
-            predicate: ((_col4 > 1) or (_col2 > 1)) (type: boolean)
+            predicate: ((_col2 > 1) or (_col4 > 1)) (type: boolean)
             Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column 
stats: NONE
             Select Operator
               expressions: _col0 (type: string), _col1 (type: string), _col4 
(type: int), _col2 (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppd_multi_insert.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_multi_insert.q.out 
b/ql/src/test/results/clientpositive/ppd_multi_insert.q.out
index 7e501c7..ab50ea1 100644
--- a/ql/src/test/results/clientpositive/ppd_multi_insert.q.out
+++ b/ql/src/test/results/clientpositive/ppd_multi_insert.q.out
@@ -106,7 +106,7 @@ STAGE PLANS:
                     serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                     name: default.mi1
           Filter Operator
-            predicate: ((_col0 >= 100) and (_col0 < 200)) (type: boolean)
+            predicate: ((_col0 < 200) and (_col0 >= 100)) (type: boolean)
             Statistics: Num rows: 61 Data size: 648 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: UDFToInteger(_col0) (type: int), _col1 (type: 
string)
@@ -121,7 +121,7 @@ STAGE PLANS:
                     serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                     name: default.mi2
           Filter Operator
-            predicate: ((_col0 >= 200) and (_col0 < 300)) (type: boolean)
+            predicate: ((_col0 < 300) and (_col0 >= 200)) (type: boolean)
             Statistics: Num rows: 61 Data size: 648 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: UDFToInteger(_col0) (type: int)
@@ -1371,7 +1371,7 @@ STAGE PLANS:
                     serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                     name: default.mi1
           Filter Operator
-            predicate: ((_col0 >= 100) and (_col0 < 200)) (type: boolean)
+            predicate: ((_col0 < 200) and (_col0 >= 100)) (type: boolean)
             Statistics: Num rows: 61 Data size: 648 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: UDFToInteger(_col0) (type: int), _col1 (type: 
string)
@@ -1386,7 +1386,7 @@ STAGE PLANS:
                     serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                     name: default.mi2
           Filter Operator
-            predicate: ((_col0 >= 200) and (_col0 < 300)) (type: boolean)
+            predicate: ((_col0 < 300) and (_col0 >= 200)) (type: boolean)
             Statistics: Num rows: 61 Data size: 648 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: UDFToInteger(_col0) (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppd_outer_join1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_outer_join1.q.out 
b/ql/src/test/results/clientpositive/ppd_outer_join1.q.out
index 38da828..5a8fb32 100644
--- a/ql/src/test/results/clientpositive/ppd_outer_join1.q.out
+++ b/ql/src/test/results/clientpositive/ppd_outer_join1.q.out
@@ -44,7 +44,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 
20.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 20.0) and (UDFToDouble(key) > 
15.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)
@@ -151,7 +151,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 
20.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 20.0) and (UDFToDouble(key) > 
15.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)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppd_outer_join2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_outer_join2.q.out 
b/ql/src/test/results/clientpositive/ppd_outer_join2.q.out
index 403e883..efbc020 100644
--- a/ql/src/test/results/clientpositive/ppd_outer_join2.q.out
+++ b/ql/src/test/results/clientpositive/ppd_outer_join2.q.out
@@ -44,7 +44,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key > '15') and (key < '20')) (type: boolean)
+              predicate: ((key < '20') and (key > '15')) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -271,7 +271,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key > '15') and (key < '20')) (type: boolean)
+              predicate: ((key < '20') and (key > '15')) (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/c5b3ccc4/ql/src/test/results/clientpositive/ppd_outer_join3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_outer_join3.q.out 
b/ql/src/test/results/clientpositive/ppd_outer_join3.q.out
index f7d5a0c..4dcf288 100644
--- a/ql/src/test/results/clientpositive/ppd_outer_join3.q.out
+++ b/ql/src/test/results/clientpositive/ppd_outer_join3.q.out
@@ -44,7 +44,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key > '15') and (key < '20')) (type: boolean)
+              predicate: ((key < '20') and (key > '15')) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -271,7 +271,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key > '15') and (key < '20')) (type: boolean)
+              predicate: ((key < '20') and (key > '15')) (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/c5b3ccc4/ql/src/test/results/clientpositive/ppd_outer_join4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_outer_join4.q.out 
b/ql/src/test/results/clientpositive/ppd_outer_join4.q.out
index 053acb5..9b6eb6d 100644
--- a/ql/src/test/results/clientpositive/ppd_outer_join4.q.out
+++ b/ql/src/test/results/clientpositive/ppd_outer_join4.q.out
@@ -50,7 +50,7 @@ STAGE PLANS:
             alias: c
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((sqrt(key) <> 13.0) and (key < '20') and (key > 
'15')) (type: boolean)
+              predicate: ((key < '20') and (key > '15') and (sqrt(key) <> 
13.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -65,7 +65,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key > '15') and (key < '20') and (sqrt(key) <> 
13.0)) (type: boolean)
+              predicate: ((key < '20') and (key > '15') and (sqrt(key) <> 
13.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)
@@ -414,7 +414,7 @@ STAGE PLANS:
             alias: c
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((sqrt(key) <> 13.0) and (key < '20') and (key > 
'15')) (type: boolean)
+              predicate: ((key < '20') and (key > '15') and (sqrt(key) <> 
13.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -429,7 +429,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key > '15') and (key < '20') and (sqrt(key) <> 
13.0)) (type: boolean)
+              predicate: ((key < '20') and (key > '15') and (sqrt(key) <> 
13.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)

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

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppd_udf_col.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppd_udf_col.q.out 
b/ql/src/test/results/clientpositive/ppd_udf_col.q.out
index 6b1f114..9a6f62c 100644
--- a/ql/src/test/results/clientpositive/ppd_udf_col.q.out
+++ b/ql/src/test/results/clientpositive/ppd_udf_col.q.out
@@ -153,7 +153,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) = 100.0) and ((UDFToDouble(value) 
* 10.0) <= 200.0)) (type: boolean)
+              predicate: (((UDFToDouble(value) * 10.0) <= 200.0) and 
(UDFToDouble(key) = 100.0)) (type: boolean)
               Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), rand() (type: double), 
(UDFToDouble(value) * 10.0) (type: double)
@@ -328,7 +328,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) = 100.0) and ((UDFToDouble(value) 
* 10.0) <= 200.0)) (type: boolean)
+              predicate: (((UDFToDouble(value) * 10.0) <= 200.0) and 
(UDFToDouble(key) = 100.0)) (type: boolean)
               Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), rand() (type: double), 
(UDFToDouble(value) * 10.0) (type: double)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out 
b/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out
index 3d9d572..d191d04 100644
--- a/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out
+++ b/ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out
@@ -223,7 +223,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: ((ds = '2008-04-08') and ((value like 'aaa%') or 
(value like 'vvv%'))) (type: boolean)
+              predicate: (((value like 'aaa%') or (value like 'vvv%')) and (ds 
= '2008-04-08')) (type: boolean)
               Statistics: Num rows: 2000 Data size: 21248 Basic stats: 
COMPLETE Column stats: NONE
               Select Operator
                 expressions: UDFToInteger(key) (type: int), value (type: 
string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/quote1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/quote1.q.out 
b/ql/src/test/results/clientpositive/quote1.q.out
index f8592c4..f873dc3 100644
--- a/ql/src/test/results/clientpositive/quote1.q.out
+++ b/ql/src/test/results/clientpositive/quote1.q.out
@@ -32,7 +32,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(key) >= 200.0) and (UDFToDouble(key) < 
300.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 300.0) and (UDFToDouble(key) >= 
200.0)) (type: boolean)
               Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: UDFToInteger(key) (type: int), value (type: 
string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out 
b/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
index c3415c4..96e8e45 100644
--- a/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
+++ b/ql/src/test/results/clientpositive/rand_partitionpruner3.q.out
@@ -63,7 +63,7 @@ STAGE PLANS:
           GatherStats: false
           Filter Operator
             isSamplingPred: false
-            predicate: ((rand(1) < 0.1) and (UDFToDouble(key) <= 50.0) and 
(UDFToDouble(key) >= 10.0)) (type: boolean)
+            predicate: ((UDFToDouble(key) <= 50.0) and (UDFToDouble(key) >= 
10.0) and (rand(1) < 0.1)) (type: boolean)
             Statistics: Num rows: 18 Data size: 191 Basic stats: COMPLETE 
Column stats: NONE
             Select Operator
               expressions: key (type: string), value (type: string), 
'2008-04-08' (type: string), hr (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/rcfile_null_value.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/rcfile_null_value.q.out 
b/ql/src/test/results/clientpositive/rcfile_null_value.q.out
index 12b7140..c6a4a18 100644
--- a/ql/src/test/results/clientpositive/rcfile_null_value.q.out
+++ b/ql/src/test/results/clientpositive/rcfile_null_value.q.out
@@ -116,7 +116,7 @@ STAGE PLANS:
             alias: src2
             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)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 25.0) and (UDFToDouble(key) > 
15.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)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/router_join_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/router_join_ppr.q.out 
b/ql/src/test/results/clientpositive/router_join_ppr.q.out
index 615d61a..b1fa29c 100644
--- a/ql/src/test/results/clientpositive/router_join_ppr.q.out
+++ b/ql/src/test/results/clientpositive/router_join_ppr.q.out
@@ -51,7 +51,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 
20.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 20.0) and (UDFToDouble(key) > 
15.0)) (type: boolean)
               Statistics: Num rows: 111 Data size: 1179 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -345,7 +345,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 
20.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 20.0) and (UDFToDouble(key) > 
15.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)
@@ -643,7 +643,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 
20.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 20.0) and (UDFToDouble(key) > 
15.0)) (type: boolean)
               Statistics: Num rows: 111 Data size: 1179 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
@@ -937,7 +937,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: false
-              predicate: ((UDFToDouble(key) > 15.0) and (UDFToDouble(key) < 
20.0)) (type: boolean)
+              predicate: ((UDFToDouble(key) < 20.0) and (UDFToDouble(key) > 
15.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)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/sample8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/sample8.q.out 
b/ql/src/test/results/clientpositive/sample8.q.out
index 2f0afb4..365b7cf 100644
--- a/ql/src/test/results/clientpositive/sample8.q.out
+++ b/ql/src/test/results/clientpositive/sample8.q.out
@@ -24,7 +24,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: true
-              predicate: ((((hash(key) & 2147483647) % 10) = 0) and value is 
not null and (((hash(key) & 2147483647) % 1) = 0)) (type: boolean)
+              predicate: ((((hash(key) & 2147483647) % 1) = 0) and 
(((hash(key) & 2147483647) % 10) = 0) and value is not null) (type: boolean)
               Statistics: Num rows: 125 Data size: 1328 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: key (type: string), value (type: string)
@@ -40,7 +40,7 @@ STAGE PLANS:
             GatherStats: false
             Filter Operator
               isSamplingPred: true
-              predicate: ((((hash(key) & 2147483647) % 1) = 0) and value is 
not null and (((hash(key) & 2147483647) % 10) = 0)) (type: boolean)
+              predicate: ((((hash(key) & 2147483647) % 1) = 0) and 
(((hash(key) & 2147483647) % 10) = 0) and value is not null) (type: boolean)
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
               Reduce Output Operator
                 key expressions: key (type: string), value (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/select_unquote_and.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/select_unquote_and.q.out 
b/ql/src/test/results/clientpositive/select_unquote_and.q.out
index b82b730..adf4794 100644
--- a/ql/src/test/results/clientpositive/select_unquote_and.q.out
+++ b/ql/src/test/results/clientpositive/select_unquote_and.q.out
@@ -55,7 +55,7 @@ STAGE PLANS:
             alias: npe_test
             Statistics: Num rows: 498 Data size: 5290 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(ds) > 1970.0) and (UDFToDouble(ds) < 
1985.0)) (type: boolean)
+              predicate: ((UDFToDouble(ds) < 1985.0) and (UDFToDouble(ds) > 
1970.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), ds 
(type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/select_unquote_or.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/select_unquote_or.q.out 
b/ql/src/test/results/clientpositive/select_unquote_or.q.out
index 6bf8430..2a38996 100644
--- a/ql/src/test/results/clientpositive/select_unquote_or.q.out
+++ b/ql/src/test/results/clientpositive/select_unquote_or.q.out
@@ -55,7 +55,7 @@ STAGE PLANS:
             alias: npe_test
             Statistics: Num rows: 498 Data size: 5290 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((UDFToDouble(ds) > 1970.0) or (UDFToDouble(ds) < 
1985.0)) (type: boolean)
+              predicate: ((UDFToDouble(ds) < 1985.0) or (UDFToDouble(ds) > 
1970.0)) (type: boolean)
               Statistics: Num rows: 332 Data size: 3526 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string), ds 
(type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/semijoin2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/semijoin2.q.out 
b/ql/src/test/results/clientpositive/semijoin2.q.out
index d6a0b90..2c3c5d8 100644
--- a/ql/src/test/results/clientpositive/semijoin2.q.out
+++ b/ql/src/test/results/clientpositive/semijoin2.q.out
@@ -62,7 +62,7 @@ STAGE PLANS:
             alias: t1
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: (bigint_col_22 is not null and decimal1709_col_26 is 
not null and tinyint_col_8 is not null and timestamp_col_10 is not null) (type: 
boolean)
+              predicate: (bigint_col_22 is not null and decimal1709_col_26 is 
not null and timestamp_col_10 is not null and tinyint_col_8 is not null) (type: 
boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Reduce Output Operator
                 key expressions: bigint_col_22 (type: bigint), 
decimal1709_col_26 (type: decimal(38,23)), tinyint_col_8 (type: tinyint)
@@ -74,7 +74,7 @@ STAGE PLANS:
             alias: t2
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: (UDFToLong(tinyint_col_6) is not null and 
decimal0504_col_37 is not null and tinyint_col_33 is not null and 
UDFToInteger(smallint_col_38) is not null) (type: boolean)
+              predicate: (UDFToInteger(smallint_col_38) is not null and 
UDFToLong(tinyint_col_6) is not null and decimal0504_col_37 is not null and 
tinyint_col_33 is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Reduce Output Operator
                 key expressions: UDFToLong(tinyint_col_6) (type: bigint), 
decimal0504_col_37 (type: decimal(38,23)), tinyint_col_33 (type: tinyint)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/semijoin4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/semijoin4.q.out 
b/ql/src/test/results/clientpositive/semijoin4.q.out
index 49c3801..53f6c17 100644
--- a/ql/src/test/results/clientpositive/semijoin4.q.out
+++ b/ql/src/test/results/clientpositive/semijoin4.q.out
@@ -87,7 +87,7 @@ STAGE PLANS:
             alias: t2
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: ((tinyint_col_21 = -92) and tinyint_col_18 is not 
null and decimal2709_col_9 is not null) (type: boolean)
+              predicate: ((tinyint_col_21 = -92) and decimal2709_col_9 is not 
null and tinyint_col_18 is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
                 expressions: decimal2709_col_9 (type: decimal(27,9)), 
tinyint_col_18 (type: tinyint)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/semijoin5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/semijoin5.q.out 
b/ql/src/test/results/clientpositive/semijoin5.q.out
index 7dfdfc3..533c077 100644
--- a/ql/src/test/results/clientpositive/semijoin5.q.out
+++ b/ql/src/test/results/clientpositive/semijoin5.q.out
@@ -79,7 +79,7 @@ STAGE PLANS:
             alias: t2
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: (tinyint_col_15 is not null and decimal2709_col_9 is 
not null and tinyint_col_20 is not null) (type: boolean)
+              predicate: (decimal2709_col_9 is not null and tinyint_col_15 is 
not null and tinyint_col_20 is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
                 expressions: decimal2709_col_9 (type: decimal(27,9)), 
int_col_10 (type: int), tinyint_col_15 (type: tinyint), smallint_col_19 (type: 
smallint), tinyint_col_20 (type: tinyint)
@@ -255,7 +255,7 @@ STAGE PLANS:
             alias: tt2
             Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
             Filter Operator
-              predicate: (timestamp_col_18 is not null and decimal1911_col_16 
is not null) (type: boolean)
+              predicate: (decimal1911_col_16 is not null and timestamp_col_18 
is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column 
stats: NONE
               Select Operator
                 expressions: decimal1911_col_16 (type: decimal(19,11)), 
timestamp_col_18 (type: timestamp)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/skewjoin.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/skewjoin.q.out 
b/ql/src/test/results/clientpositive/skewjoin.q.out
index cd7d6fa..9df48ed 100644
--- a/ql/src/test/results/clientpositive/skewjoin.q.out
+++ b/ql/src/test/results/clientpositive/skewjoin.q.out
@@ -756,7 +756,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (key is not null and UDFToDouble(substring(value, 5)) 
is not null) (type: boolean)
+              predicate: (UDFToDouble(substring(value, 5)) is not null 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)
@@ -771,7 +771,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: (key is not null and (substring(value, 5) + 1) is not 
null) (type: boolean)
+              predicate: ((substring(value, 5) + 1) is not null 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)
@@ -934,7 +934,7 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE 
Column stats: NONE
             Filter Operator
-              predicate: ((key < 80) and (key < 100)) (type: boolean)
+              predicate: ((key < 100) and (key < 80)) (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/c5b3ccc4/ql/src/test/results/clientpositive/skewjoin_mapjoin1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/skewjoin_mapjoin1.q.out 
b/ql/src/test/results/clientpositive/skewjoin_mapjoin1.q.out
index ad9e08a..a264045 100644
--- a/ql/src/test/results/clientpositive/skewjoin_mapjoin1.q.out
+++ b/ql/src/test/results/clientpositive/skewjoin_mapjoin1.q.out
@@ -61,7 +61,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = '2') or (key = '3'))) 
(type: boolean)
+              predicate: (((key = '2') or (key = '3')) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -76,7 +76,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = '2') or (key = 
'3')))) (type: boolean)
+              predicate: ((not ((key = '2') or (key = '3'))) and key is not 
null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -94,7 +94,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = '2') or (key = '3'))) 
(type: boolean)
+              predicate: (((key = '2') or (key = '3')) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -121,7 +121,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = '2') or (key = 
'3')))) (type: boolean)
+              predicate: ((not ((key = '2') or (key = '3'))) and key is not 
null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -337,7 +337,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = '2') or (key = '3'))) 
(type: boolean)
+              predicate: (((key = '2') or (key = '3')) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -352,7 +352,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = '2') or (key = 
'3')))) (type: boolean)
+              predicate: ((not ((key = '2') or (key = '3'))) and key is not 
null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -370,7 +370,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = '2') or (key = '3'))) 
(type: boolean)
+              predicate: (((key = '2') or (key = '3')) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)
@@ -398,7 +398,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = '2') or (key = 
'3')))) (type: boolean)
+              predicate: ((not ((key = '2') or (key = '3'))) and key is not 
null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/skewjoin_mapjoin10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/skewjoin_mapjoin10.q.out 
b/ql/src/test/results/clientpositive/skewjoin_mapjoin10.q.out
index de65931..3768732 100644
--- a/ql/src/test/results/clientpositive/skewjoin_mapjoin10.q.out
+++ b/ql/src/test/results/clientpositive/skewjoin_mapjoin10.q.out
@@ -93,7 +93,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = 2) or (key = 3))) (type: 
boolean)
+              predicate: (((key = 2) or (key = 3)) and key is not null) (type: 
boolean)
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: int), val (type: string)
@@ -108,7 +108,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = 2) or (key = 3)))) 
(type: boolean)
+              predicate: ((not ((key = 2) or (key = 3))) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: int), val (type: string)
@@ -126,7 +126,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = 2) or (key = 3))) (type: 
boolean)
+              predicate: (((key = 2) or (key = 3)) and key is not null) (type: 
boolean)
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: int), val (type: string)
@@ -153,7 +153,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = 2) or (key = 3)))) 
(type: boolean)
+              predicate: ((not ((key = 2) or (key = 3))) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: int), val (type: string)
@@ -369,7 +369,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = 2) or (key = 3))) (type: 
boolean)
+              predicate: (((key = 2) or (key = 3)) and key is not null) (type: 
boolean)
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: int)
@@ -384,7 +384,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = 2) or (key = 3)))) 
(type: boolean)
+              predicate: ((not ((key = 2) or (key = 3))) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: int)
@@ -402,7 +402,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = 2) or (key = 3))) (type: 
boolean)
+              predicate: (((key = 2) or (key = 3)) and key is not null) (type: 
boolean)
               Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: int)
@@ -430,7 +430,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = 2) or (key = 3)))) 
(type: boolean)
+              predicate: ((not ((key = 2) or (key = 3))) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: int)

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

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

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

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/skewjoin_mapjoin4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/skewjoin_mapjoin4.q.out 
b/ql/src/test/results/clientpositive/skewjoin_mapjoin4.q.out
index c3809e9..18e946e 100644
--- a/ql/src/test/results/clientpositive/skewjoin_mapjoin4.q.out
+++ b/ql/src/test/results/clientpositive/skewjoin_mapjoin4.q.out
@@ -83,7 +83,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (((key = '2') or (key = '8')) or 
(key = '3'))) (type: boolean)
+              predicate: ((((key = '2') or (key = '8')) or (key = '3')) and 
key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -99,7 +99,7 @@ STAGE PLANS:
             alias: c
             Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (((key = '2') or (key = '8')) or 
(key = '3'))) (type: boolean)
+              predicate: ((((key = '2') or (key = '8')) or (key = '3')) and 
key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -115,7 +115,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (((key = '2') or (key = 
'8')) or (key = '3')))) (type: boolean)
+              predicate: ((not (((key = '2') or (key = '8')) or (key = '3'))) 
and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -131,7 +131,7 @@ STAGE PLANS:
             alias: c
             Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (((key = '2') or (key = 
'8')) or (key = '3')))) (type: boolean)
+              predicate: ((not (((key = '2') or (key = '8')) or (key = '3'))) 
and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -150,7 +150,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (((key = '2') or (key = '8')) or 
(key = '3'))) (type: boolean)
+              predicate: ((((key = '2') or (key = '8')) or (key = '3')) and 
key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -179,7 +179,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (((key = '2') or (key = 
'8')) or (key = '3')))) (type: boolean)
+              predicate: ((not (((key = '2') or (key = '8')) or (key = '3'))) 
and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/skewjoin_mapjoin6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/skewjoin_mapjoin6.q.out 
b/ql/src/test/results/clientpositive/skewjoin_mapjoin6.q.out
index 7ce87ec..d633469 100644
--- a/ql/src/test/results/clientpositive/skewjoin_mapjoin6.q.out
+++ b/ql/src/test/results/clientpositive/skewjoin_mapjoin6.q.out
@@ -63,7 +63,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (key = '8')) (type: boolean)
+              predicate: ((key = '8') and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
@@ -74,7 +74,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (key = '8'))) (type: 
boolean)
+              predicate: ((not (key = '8')) and key is not null) (type: 
boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               HashTable Sink Operator
                 keys:
@@ -88,7 +88,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (key = '8')) (type: boolean)
+              predicate: ((key = '8') and key is not null) (type: boolean)
               Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:
@@ -141,7 +141,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (key = '8'))) (type: 
boolean)
+              predicate: ((not (key = '8')) and key is not null) (type: 
boolean)
               Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE 
Column stats: NONE
               Map Join Operator
                 condition map:

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/skewjoin_mapjoin7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/skewjoin_mapjoin7.q.out 
b/ql/src/test/results/clientpositive/skewjoin_mapjoin7.q.out
index e48fbee..b47eb53 100644
--- a/ql/src/test/results/clientpositive/skewjoin_mapjoin7.q.out
+++ b/ql/src/test/results/clientpositive/skewjoin_mapjoin7.q.out
@@ -72,7 +72,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (key = '2')) (type: boolean)
+              predicate: ((key = '2') and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -87,7 +87,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              predicate: ((not (key = '2')) and key is not null) (type: 
boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -105,7 +105,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (key = '2')) (type: boolean)
+              predicate: ((key = '2') and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -135,7 +135,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              predicate: ((not (key = '2')) and key is not null) (type: 
boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -203,7 +203,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (key = '2')) (type: boolean)
+              predicate: ((key = '2') and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -218,7 +218,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              predicate: ((not (key = '2')) and key is not null) (type: 
boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -236,7 +236,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (key = '2')) (type: boolean)
+              predicate: ((key = '2') and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -266,7 +266,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              predicate: ((not (key = '2')) and key is not null) (type: 
boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/skewjoin_mapjoin9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/skewjoin_mapjoin9.q.out 
b/ql/src/test/results/clientpositive/skewjoin_mapjoin9.q.out
index f38c087..a2e9e13 100644
--- a/ql/src/test/results/clientpositive/skewjoin_mapjoin9.q.out
+++ b/ql/src/test/results/clientpositive/skewjoin_mapjoin9.q.out
@@ -86,7 +86,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and val is not null and (key = '2')) 
(type: boolean)
+              predicate: ((key = '2') and key is not null and val is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -116,7 +116,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and val is not null and (not (key = 
'2'))) (type: boolean)
+              predicate: ((not (key = '2')) and key is not null and val is not 
null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -134,7 +134,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (key = '2')) (type: boolean)
+              predicate: ((key = '2') and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -169,7 +169,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (key = '2'))) (type: 
boolean)
+              predicate: ((not (key = '2')) and key is not null) (type: 
boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/skewjoin_union_remove_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/skewjoin_union_remove_1.q.out 
b/ql/src/test/results/clientpositive/skewjoin_union_remove_1.q.out
index bb3a663..862744b 100644
--- a/ql/src/test/results/clientpositive/skewjoin_union_remove_1.q.out
+++ b/ql/src/test/results/clientpositive/skewjoin_union_remove_1.q.out
@@ -53,7 +53,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = '2') or (key = '3'))) 
(type: boolean)
+              predicate: (((key = '2') or (key = '3')) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -69,7 +69,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = '2') or (key = '3'))) 
(type: boolean)
+              predicate: (((key = '2') or (key = '3')) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -105,7 +105,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = '2') or (key = 
'3')))) (type: boolean)
+              predicate: ((not ((key = '2') or (key = '3'))) and key is not 
null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -121,7 +121,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = '2') or (key = 
'3')))) (type: boolean)
+              predicate: ((not ((key = '2') or (key = '3'))) and key is not 
null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -339,7 +339,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = '2') or (key = '3'))) 
(type: boolean)
+              predicate: (((key = '2') or (key = '3')) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -355,7 +355,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and ((key = '2') or (key = '3'))) 
(type: boolean)
+              predicate: (((key = '2') or (key = '3')) and key is not null) 
(type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -402,7 +402,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = '2') or (key = 
'3')))) (type: boolean)
+              predicate: ((not ((key = '2') or (key = '3'))) and key is not 
null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -418,7 +418,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not ((key = '2') or (key = 
'3')))) (type: boolean)
+              predicate: ((not ((key = '2') or (key = '3'))) and key is not 
null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/c5b3ccc4/ql/src/test/results/clientpositive/skewjoin_union_remove_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/skewjoin_union_remove_2.q.out 
b/ql/src/test/results/clientpositive/skewjoin_union_remove_2.q.out
index 71c4690..efad5df 100644
--- a/ql/src/test/results/clientpositive/skewjoin_union_remove_2.q.out
+++ b/ql/src/test/results/clientpositive/skewjoin_union_remove_2.q.out
@@ -69,7 +69,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (((key = '2') or (key = '8')) or 
(key = '3'))) (type: boolean)
+              predicate: ((((key = '2') or (key = '8')) or (key = '3')) and 
key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -85,7 +85,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (((key = '2') or (key = '8')) or 
(key = '3'))) (type: boolean)
+              predicate: ((((key = '2') or (key = '8')) or (key = '3')) and 
key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -101,7 +101,7 @@ STAGE PLANS:
             alias: c
             Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (((key = '2') or (key = '8')) or 
(key = '3'))) (type: boolean)
+              predicate: ((((key = '2') or (key = '8')) or (key = '3')) and 
key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -139,7 +139,7 @@ STAGE PLANS:
             alias: a
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (((key = '2') or (key = 
'8')) or (key = '3')))) (type: boolean)
+              predicate: ((not (((key = '2') or (key = '8')) or (key = '3'))) 
and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -155,7 +155,7 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (((key = '2') or (key = 
'8')) or (key = '3')))) (type: boolean)
+              predicate: ((not (((key = '2') or (key = '8')) or (key = '3'))) 
and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 30 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)
@@ -171,7 +171,7 @@ STAGE PLANS:
             alias: c
             Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column 
stats: NONE
             Filter Operator
-              predicate: (key is not null and (not (((key = '2') or (key = 
'8')) or (key = '3')))) (type: boolean)
+              predicate: ((not (((key = '2') or (key = '8')) or (key = '3'))) 
and key is not null) (type: boolean)
               Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE 
Column stats: NONE
               Select Operator
                 expressions: key (type: string), val (type: string)

Reply via email to