hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1608997 [5/5] - in /hive/branches/cbo: ./ beeline/src/java/org/apache/hive/beeline/ beeline/src/main/resources/ bin/ext/ cli/src/java/org/apache/hadoop/hive/cli/ common/src/java/org/apache/hadoop/hive/common/ common/src/java/org/apache/had...
Date Wed, 09 Jul 2014 03:06:26 GMT
Modified: hive/branches/cbo/ql/src/test/results/clientpositive/ppd_gby_join.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/ppd_gby_join.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/ppd_gby_join.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/ppd_gby_join.q.out Wed Jul  9 03:06:21 2014
@@ -31,20 +31,20 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((key > '2') and key is not null) and (key <> '4')) and (key > '20')) (type: boolean)
-              Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((((key > '2') and (key < '400')) and key is not null) and (key <> '4')) and (key > '20')) (type: boolean)
+              Statistics: Num rows: 1 Data size: 100 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 100 Basic stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: _col0 is not null (type: boolean)
-                  Statistics: Num rows: 2 Data size: 200 Basic stats: COMPLETE Column stats: NONE
+                  predicate: ((_col0 < '400') and _col0 is not null) (type: boolean)
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
-                    Statistics: Num rows: 2 Data size: 200 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
           TableScan
             alias: src
             Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
@@ -56,7 +56,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                 Filter Operator
-                  predicate: (_col0 is not null and (_col0 < '400')) (type: boolean)
+                  predicate: ((_col0 < '400') and _col0 is not null) (type: boolean)
                   Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
@@ -72,7 +72,7 @@ STAGE PLANS:
             0 {KEY.reducesinkkey0} {VALUE._col0}
             1 {KEY.reducesinkkey0}
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 2 Data size: 220 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
           Filter Operator
             predicate: ((((_col0 > '20') and ((_col1 < 'val_50') or (_col0 > '2'))) and ((_col2 > '50') or (_col0 < '50'))) and (_col2 <> '4')) (type: boolean)
             Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
@@ -161,17 +161,17 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((key > '2') and key is not null) and (key <> '4')) and (key > '20')) (type: boolean)
-              Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((((key > '2') and (key < '400')) and key is not null) and (key <> '4')) and (key > '20')) (type: boolean)
+              Statistics: Num rows: 1 Data size: 100 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 100 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: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 100 Basic stats: COMPLETE Column stats: NONE
           TableScan
             alias: src
             Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
@@ -196,7 +196,7 @@ STAGE PLANS:
             0 {KEY.reducesinkkey0} {VALUE._col0}
             1 {KEY.reducesinkkey0}
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 3 Data size: 330 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 110 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             predicate: ((((_col0 > '20') and ((_col1 < 'val_50') or (_col0 > '2'))) and ((_col2 > '50') or (_col0 < '50'))) and (_col2 <> '4')) (type: boolean)
             Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join.q.out Wed Jul  9 03:06:21 2014
@@ -28,20 +28,20 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((key > '2') and key is not null) and (key <> '4')) and (key > '20')) (type: boolean)
-              Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((((key > '2') and (key < '400')) and key is not null) and (key <> '4')) and (key > '20')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                 Filter Operator
-                  predicate: _col0 is not null (type: boolean)
-                  Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
+                  predicate: ((_col0 < '400') and _col0 is not null) (type: boolean)
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
-                    Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                     value expressions: _col1 (type: string)
           TableScan
             alias: src
@@ -54,7 +54,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                 Filter Operator
-                  predicate: (_col0 is not null and (_col0 < '400')) (type: boolean)
+                  predicate: ((_col0 < '400') and _col0 is not null) (type: boolean)
                   Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
@@ -70,7 +70,7 @@ STAGE PLANS:
             0 {KEY.reducesinkkey0} {VALUE._col0}
             1 {KEY.reducesinkkey0} {VALUE._col0}
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
           Filter Operator
             predicate: ((((_col0 > '20') and ((_col1 < 'val_50') or (_col0 > '2'))) and ((_col2 > '50') or (_col0 < '50'))) and (_col2 <> '4')) (type: boolean)
             Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
@@ -560,17 +560,17 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((key > '2') and key is not null) and (key <> '4')) and (key > '20')) (type: boolean)
-              Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((((key > '2') and (key < '400')) and key is not null) and (key <> '4')) and (key > '20')) (type: boolean)
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
             alias: src
@@ -596,7 +596,7 @@ STAGE PLANS:
             0 {KEY.reducesinkkey0} {VALUE._col0}
             1 {KEY.reducesinkkey0} {VALUE._col0}
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
           Filter Operator
             predicate: ((((_col0 > '20') and ((_col1 < 'val_50') or (_col0 > '2'))) and ((_col2 > '50') or (_col0 < '50'))) and (_col2 <> '4')) (type: boolean)
             Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join2.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join2.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join2.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join2.q.out Wed Jul  9 03:06:21 2014
@@ -35,20 +35,20 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((key <> '305') and key is not null) and (key <> '14')) and (key <> '311')) (type: boolean)
-              Statistics: Num rows: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((((key <> '305') and (key < '400')) and key is not null) and (key <> '14')) and (key <> '311')) (type: boolean)
+              Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: _col0 is not null (type: boolean)
-                  Statistics: Num rows: 8 Data size: 1603 Basic stats: COMPLETE Column stats: NONE
+                  predicate: ((_col0 < '400') and _col0 is not null) (type: boolean)
+                  Statistics: Num rows: 1 Data size: 200 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: 8 Data size: 1603 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: string)
           TableScan
             alias: src
@@ -61,13 +61,13 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 4 Data size: 801 Basic stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: (_col0 is not null and (_col0 < '400')) (type: boolean)
-                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                  predicate: ((_col0 < '400') and _col0 is not null) (type: boolean)
+                  Statistics: Num rows: 1 Data size: 200 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: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: string)
       Reduce Operator Tree:
         Join Operator
@@ -77,10 +77,10 @@ STAGE PLANS:
             0 {KEY.reducesinkkey0} {VALUE._col0}
             1 {KEY.reducesinkkey0} {VALUE._col0}
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 8 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             predicate: _col1 is not null (type: boolean)
-            Statistics: Num rows: 4 Data size: 881 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
               table:
@@ -96,7 +96,7 @@ STAGE PLANS:
               key expressions: _col1 (type: string)
               sort order: +
               Map-reduce partition columns: _col1 (type: string)
-              Statistics: Num rows: 4 Data size: 881 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col0 (type: string), _col2 (type: string), _col3 (type: string)
           TableScan
             alias: src
@@ -1728,17 +1728,17 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((((key <> '305') and key is not null) and (key <> '14')) and (key <> '311')) (type: boolean)
-              Statistics: Num rows: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((((key <> '305') and (key < '400')) and key is not null) and (key <> '14')) and (key <> '311')) (type: boolean)
+              Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 5 Data size: 1002 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: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
             alias: src
@@ -1764,7 +1764,7 @@ STAGE PLANS:
             0 {KEY.reducesinkkey0} {VALUE._col0}
             1 {KEY.reducesinkkey0} {VALUE._col0}
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 16 Data size: 3306 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 5 Data size: 1102 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
             table:
@@ -1780,7 +1780,7 @@ STAGE PLANS:
               key expressions: _col1 (type: string)
               sort order: +
               Map-reduce partition columns: _col1 (type: string)
-              Statistics: Num rows: 16 Data size: 3306 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 5 Data size: 1102 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col0 (type: string), _col2 (type: string), _col3 (type: string)
           TableScan
             alias: src
@@ -1806,17 +1806,17 @@ STAGE PLANS:
             0 {VALUE._col0} {KEY.reducesinkkey0} {VALUE._col1} {VALUE._col2}
             1 {VALUE._col0}
           outputColumnNames: _col0, _col1, _col2, _col3, _col4
-          Statistics: Num rows: 17 Data size: 3636 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 16 Data size: 3306 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             predicate: (((((_col0 <> '311') and ((_col1 <> 'val_50') or (_col0 > '1'))) and ((_col2 <> '10') or (_col0 <> '10'))) and (_col2 <> '14')) and (sqrt(_col4) <> 13)) (type: boolean)
-            Statistics: Num rows: 17 Data size: 3636 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 16 Data size: 3306 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: _col0 (type: string), _col3 (type: string)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 17 Data size: 3636 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 16 Data size: 3306 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
                 compressed: false
-                Statistics: Num rows: 17 Data size: 3636 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 16 Data size: 3306 Basic stats: COMPLETE Column stats: NONE
                 table:
                     input format: org.apache.hadoop.mapred.TextInputFormat
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join3.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join3.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join3.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join3.q.out Wed Jul  9 03:06:21 2014
@@ -34,20 +34,20 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((((key <> '12') and key is not null) and (key <> '4')) and (key > '0')) and (key <> '1')) (type: boolean)
-              Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((((((key <> '12') and (key < '400')) and key is not null) and (key <> '4')) and (key > '0')) and (key <> '1')) (type: boolean)
+              Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: _col0 is not null (type: boolean)
-                  Statistics: Num rows: 3 Data size: 601 Basic stats: COMPLETE Column stats: NONE
+                  predicate: ((_col0 < '400') and _col0 is not null) (type: boolean)
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
                     sort order: +
                     Map-reduce partition columns: _col0 (type: string)
-                    Statistics: Num rows: 3 Data size: 601 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                     value expressions: _col1 (type: string)
           TableScan
             alias: src
@@ -60,7 +60,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: (_col0 is not null and (_col0 < '400')) (type: boolean)
+                  predicate: ((_col0 < '400') and _col0 is not null) (type: boolean)
                   Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: string)
@@ -72,20 +72,20 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((((key <> '13') and key is not null) and (key <> '1')) and (key > '0')) and (key <> '4')) (type: boolean)
-              Statistics: Num rows: 9 Data size: 901 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((((((key <> '13') and (key < '400')) and key is not null) and (key <> '1')) and (key > '0')) and (key <> '4')) (type: boolean)
+              Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 9 Data size: 901 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
                 Filter Operator
-                  predicate: _col0 is not null (type: boolean)
-                  Statistics: Num rows: 5 Data size: 500 Basic stats: COMPLETE Column stats: NONE
+                  predicate: ((_col0 < '400') and _col0 is not null) (type: boolean)
+                  Statistics: Num rows: 1 Data size: 100 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: 5 Data size: 500 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 100 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -96,17 +96,17 @@ STAGE PLANS:
             1 {KEY.reducesinkkey0} {VALUE._col0}
             2 {KEY.reducesinkkey0}
           outputColumnNames: _col0, _col1, _col2, _col3, _col4
-          Statistics: Num rows: 11 Data size: 1100 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 2 Data size: 220 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             predicate: (((((_col0 > '0') and ((_col1 <> 'val_500') or (_col0 > '1'))) and ((_col2 > '10') or (_col0 <> '10'))) and (_col2 <> '4')) and (_col4 <> '1')) (type: boolean)
-            Statistics: Num rows: 5 Data size: 500 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
             Select Operator
               expressions: _col0 (type: string), _col3 (type: string)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 5 Data size: 500 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
               File Output Operator
                 compressed: false
-                Statistics: Num rows: 5 Data size: 500 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                 table:
                     input format: org.apache.hadoop.mapred.TextInputFormat
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -1755,17 +1755,17 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((((key <> '12') and key is not null) and (key <> '4')) and (key > '0')) and (key <> '1')) (type: boolean)
-              Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((((((key <> '12') and (key < '400')) and key is not null) and (key <> '4')) and (key > '0')) and (key <> '1')) (type: boolean)
+              Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 200 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: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
             alias: src
@@ -1787,17 +1787,17 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (((((key <> '13') and key is not null) and (key <> '1')) and (key > '0')) and (key <> '4')) (type: boolean)
-              Statistics: Num rows: 9 Data size: 901 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((((((key <> '13') and (key < '400')) and key is not null) and (key <> '1')) and (key > '0')) and (key <> '4')) (type: boolean)
+              Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 9 Data size: 901 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 3 Data size: 300 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: 9 Data size: 901 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1808,17 +1808,17 @@ STAGE PLANS:
             1 {KEY.reducesinkkey0} {VALUE._col0}
             2 {KEY.reducesinkkey0}
           outputColumnNames: _col0, _col1, _col2, _col3, _col4
-          Statistics: Num rows: 19 Data size: 1982 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 6 Data size: 660 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             predicate: (((((_col0 > '0') and ((_col1 <> 'val_500') or (_col0 > '1'))) and ((_col2 > '10') or (_col0 <> '10'))) and (_col2 <> '4')) and (_col4 <> '1')) (type: boolean)
-            Statistics: Num rows: 10 Data size: 1043 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 2 Data size: 220 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: _col0 (type: string), _col3 (type: string)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 10 Data size: 1043 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 2 Data size: 220 Basic stats: COMPLETE Column stats: NONE
               File Output Operator
                 compressed: false
-                Statistics: Num rows: 10 Data size: 1043 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 2 Data size: 220 Basic stats: COMPLETE Column stats: NONE
                 table:
                     input format: org.apache.hadoop.mapred.TextInputFormat
                     output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join_filter.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join_filter.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join_filter.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/ppd_join_filter.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/ppd_union_view.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/ppd_union_view.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/ppd_union_view.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/ppd_union_view.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/ppd_vc.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/ppd_vc.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/ppd_vc.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/ppd_vc.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/push_or.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/push_or.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/push_or.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/push_or.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/reduce_deduplicate.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/reduce_deduplicate.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/reduce_deduplicate.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/reduce_deduplicate.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/regex_col.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/regex_col.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/regex_col.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/regex_col.q.out Wed Jul  9 03:06:21 2014
@@ -181,13 +181,13 @@ STAGE PLANS:
             alias: b
             Statistics: Num rows: 232 Data size: 23248 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 116 Data size: 11624 Basic stats: COMPLETE Column stats: NONE
+              predicate: ((key = 103) and key is not null) (type: boolean)
+              Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 key expressions: key (type: string), hr (type: string), ds (type: string)
                 sort order: +++
                 Map-reduce partition columns: key (type: string), hr (type: string), ds (type: string)
-                Statistics: Num rows: 116 Data size: 11624 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
           TableScan
             alias: a
             Statistics: Num rows: 232 Data size: 23248 Basic stats: COMPLETE Column stats: NONE
@@ -207,11 +207,11 @@ STAGE PLANS:
             0 
             1 {KEY.reducesinkkey2} {KEY.reducesinkkey1}
           outputColumnNames: _col8, _col9
-          Statistics: Num rows: 127 Data size: 12786 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 63 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: _col8 (type: string), _col9 (type: string)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 127 Data size: 12786 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 63 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
               table:
@@ -226,15 +226,15 @@ STAGE PLANS:
             Reduce Output Operator
               key expressions: _col0 (type: string), _col1 (type: string)
               sort order: ++
-              Statistics: Num rows: 127 Data size: 12786 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 63 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string)
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 127 Data size: 12786 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 63 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 127 Data size: 12786 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 63 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.TextInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/regexp_extract.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/regexp_extract.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/regexp_extract.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/regexp_extract.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/router_join_ppr.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/router_join_ppr.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/router_join_ppr.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/router_join_ppr.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/sample10.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/sample10.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/sample10.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/sample10.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/sample6.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/sample6.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/sample6.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/sample6.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/sample8.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/sample8.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/sample8.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/sample8.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/skewjoin.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/skewjoin.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/skewjoin.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/skewjoin.q.out Wed Jul  9 03:06:21 2014
@@ -965,48 +965,48 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((key < 100) and key is not null) and (key < 80)) (type: boolean)
+              Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 200 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: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: string)
           TableScan
             alias: src
             Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((key < 100) and key is not null) (type: boolean)
-              Statistics: Num rows: 10 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((key < 80) and key is not null) and (key < 100)) (type: boolean)
+              Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 10 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 3 Data size: 300 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: 10 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
           TableScan
             alias: src
             Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((key < 80) and key is not null) (type: boolean)
-              Statistics: Num rows: 10 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+              predicate: (((key < 100) and key is not null) and (key < 80)) (type: boolean)
+              Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 10 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 3 Data size: 300 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: 10 Data size: 1002 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 3 Data size: 300 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -1018,11 +1018,11 @@ STAGE PLANS:
             2 
           handleSkewJoin: true
           outputColumnNames: _col0, _col3
-          Statistics: Num rows: 33 Data size: 6613 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 6 Data size: 660 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: _col0 (type: string), _col3 (type: string)
             outputColumnNames: _col0, _col3
-            Statistics: Num rows: 33 Data size: 6613 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 6 Data size: 660 Basic stats: COMPLETE Column stats: NONE
             Group By Operator
               aggregations: sum(hash(_col0)), sum(hash(_col3))
               mode: hash

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/smb_mapjoin_13.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/smb_mapjoin_13.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/smb_mapjoin_13.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/smb_mapjoin_13.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/smb_mapjoin_15.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/smb_mapjoin_15.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/smb_mapjoin_15.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/smb_mapjoin_15.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_5.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_5.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_5.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_5.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_6.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_6.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_6.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_6.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_7.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_7.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_7.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/sort_merge_join_desc_7.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/table_access_keys_stats.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/table_access_keys_stats.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/table_access_keys_stats.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/table_access_keys_stats.q.out Wed Jul  9 03:06:21 2014
@@ -326,7 +326,7 @@ PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 PREHOOK: Input: default@t2
 #### A masked pattern was here ####
-Operator:JOIN_8
+Operator:JOIN_6
 Table:default@t2
 Keys:key
 Table:default@t1

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket2.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket2.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket2.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket2.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket3.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket3.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket3.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket3.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket4.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket4.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket4.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/tez/bucket4.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/ctas.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/ctas.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/tez/ctas.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/tez/ctas.q.out Wed Jul  9 03:06:21 2014
@@ -735,6 +735,7 @@ STAGE PLANS:
                       sort order: ++
                       Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
                       tag: -1
+                      auto parallelism: true
             Path -> Alias:
 #### A masked pattern was here ####
             Path -> Partition:
@@ -799,6 +800,7 @@ STAGE PLANS:
                     sort order: ++
                     Statistics: Num rows: 10 Data size: 2000 Basic stats: COMPLETE Column stats: NONE
                     tag: -1
+                    auto parallelism: false
         Reducer 3 
             Needs Tagging: false
             Reduce Operator Tree:

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/disable_merge_for_bucketing.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/disable_merge_for_bucketing.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/tez/disable_merge_for_bucketing.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/tez/disable_merge_for_bucketing.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/filter_join_breaktask.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/filter_join_breaktask.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/tez/filter_join_breaktask.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/tez/filter_join_breaktask.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/transform_ppr1.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/transform_ppr1.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/tez/transform_ppr1.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/tez/transform_ppr1.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/tez/transform_ppr2.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/tez/transform_ppr2.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/tez/transform_ppr2.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/tez/transform_ppr2.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/transform_ppr1.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/transform_ppr1.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/transform_ppr1.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/transform_ppr1.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/transform_ppr2.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/transform_ppr2.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/transform_ppr2.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/transform_ppr2.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_explode.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_explode.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/udf_explode.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/udf_explode.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udf_format_number.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udf_format_number.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/udf_format_number.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/udf_format_number.q.out Wed Jul  9 03:06:21 2014
@@ -171,3 +171,20 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 -9,223,372,036,854,775,807.0000000000	9,223,372,036,854,775,807.00000000000000000000	0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005	179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+PREHOOK: query: -- floats
+SELECT format_number(CAST(12332.123456 AS FLOAT), 4),
+    format_number(CAST(12332.1 AS FLOAT), 4),
+    format_number(CAST(-12332.2 AS FLOAT), 0)
+FROM src tablesample (1 rows)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: -- floats
+SELECT format_number(CAST(12332.123456 AS FLOAT), 4),
+    format_number(CAST(12332.1 AS FLOAT), 4),
+    format_number(CAST(-12332.2 AS FLOAT), 0)
+FROM src tablesample (1 rows)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+12,332.1230	12,332.0996	-12,332

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/udtf_explode.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/udtf_explode.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/udtf_explode.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/udtf_explode.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/union22.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/union22.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/union22.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/union22.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/union24.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/union24.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/union24.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/union24.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/union_ppr.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/union_ppr.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
Files hive/branches/cbo/ql/src/test/results/clientpositive/union_ppr.q.out (original) and hive/branches/cbo/ql/src/test/results/clientpositive/union_ppr.q.out Wed Jul  9 03:06:21 2014 differ

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/windowing_navfn.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/windowing_navfn.q.out?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/windowing_navfn.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/windowing_navfn.q.out Wed Jul  9 03:06:21 2014
@@ -595,3 +595,168 @@ POSTHOOK: Input: default@over10k
 #### A masked pattern was here ####
 10	oscar allen	65662	65662
 10	oscar carson	65549	65549
+PREHOOK: query: drop table if exists wtest
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists wtest
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table wtest as
+select a, b
+from
+(
+SELECT explode(
+   map(
+   3, array(1,2,3,4,5), 
+   1, array(int(null),int(null),int(null), int(null), int(null)), 
+   2, array(1,null,2, null, 3)
+   )
+  ) as (a,barr) FROM (select * from src limit 1) s
+  ) s1 lateral view explode(barr) arr as b
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@src
+POSTHOOK: query: create table wtest as
+select a, b
+from
+(
+SELECT explode(
+   map(
+   3, array(1,2,3,4,5), 
+   1, array(int(null),int(null),int(null), int(null), int(null)), 
+   2, array(1,null,2, null, 3)
+   )
+  ) as (a,barr) FROM (select * from src limit 1) s
+  ) s1 lateral view explode(barr) arr as b
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@wtest
+PREHOOK: query: select a, b,
+first_value(b) over (partition by a order by b rows between 1 preceding and 1 following ) ,
+first_value(b, true) over (partition by a order by b rows between 1 preceding and 1 following ) ,
+first_value(b) over (partition by a order by b rows between unbounded preceding and 1 following ) ,
+first_value(b, true) over (partition by a order by b rows between unbounded preceding and 1 following ) 
+from wtest
+PREHOOK: type: QUERY
+PREHOOK: Input: default@wtest
+#### A masked pattern was here ####
+POSTHOOK: query: select a, b,
+first_value(b) over (partition by a order by b rows between 1 preceding and 1 following ) ,
+first_value(b, true) over (partition by a order by b rows between 1 preceding and 1 following ) ,
+first_value(b) over (partition by a order by b rows between unbounded preceding and 1 following ) ,
+first_value(b, true) over (partition by a order by b rows between unbounded preceding and 1 following ) 
+from wtest
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@wtest
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+2	NULL	NULL	NULL	NULL	NULL
+2	NULL	NULL	1	NULL	1
+2	1	NULL	1	NULL	1
+2	2	1	1	NULL	1
+2	3	2	2	NULL	1
+3	1	1	1	1	1
+3	2	1	1	1	1
+3	3	2	2	1	1
+3	4	3	3	1	1
+3	5	4	4	1	1
+PREHOOK: query: select a, b,
+first_value(b) over (partition by a order by b desc  rows between 1 preceding and 1 following ) ,
+first_value(b, true) over (partition by a order by b desc rows between 1 preceding and 1 following ) ,
+first_value(b) over (partition by a order by b desc rows between unbounded preceding and 1 following ) ,
+first_value(b, true) over (partition by a order by b desc rows between unbounded preceding and 1 following ) 
+from wtest
+PREHOOK: type: QUERY
+PREHOOK: Input: default@wtest
+#### A masked pattern was here ####
+POSTHOOK: query: select a, b,
+first_value(b) over (partition by a order by b desc  rows between 1 preceding and 1 following ) ,
+first_value(b, true) over (partition by a order by b desc rows between 1 preceding and 1 following ) ,
+first_value(b) over (partition by a order by b desc rows between unbounded preceding and 1 following ) ,
+first_value(b, true) over (partition by a order by b desc rows between unbounded preceding and 1 following ) 
+from wtest
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@wtest
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+2	3	3	3	3	3
+2	2	3	3	3	3
+2	1	2	2	3	3
+2	NULL	1	1	3	3
+2	NULL	NULL	NULL	3	3
+3	5	5	5	5	5
+3	4	5	5	5	5
+3	3	4	4	5	5
+3	2	3	3	5	5
+3	1	2	2	5	5
+PREHOOK: query: select a, b,
+last_value(b) over (partition by a order by b rows between 1 preceding and 1 following ) ,
+last_value(b, true) over (partition by a order by b rows between 1 preceding and 1 following ) ,
+last_value(b) over (partition by a order by b rows between unbounded preceding and 1 following ) ,
+last_value(b, true) over (partition by a order by b rows between unbounded preceding and 1 following ) 
+from wtest
+PREHOOK: type: QUERY
+PREHOOK: Input: default@wtest
+#### A masked pattern was here ####
+POSTHOOK: query: select a, b,
+last_value(b) over (partition by a order by b rows between 1 preceding and 1 following ) ,
+last_value(b, true) over (partition by a order by b rows between 1 preceding and 1 following ) ,
+last_value(b) over (partition by a order by b rows between unbounded preceding and 1 following ) ,
+last_value(b, true) over (partition by a order by b rows between unbounded preceding and 1 following ) 
+from wtest
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@wtest
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+2	NULL	NULL	NULL	NULL	NULL
+2	NULL	1	1	1	1
+2	1	2	2	2	2
+2	2	3	3	3	3
+2	3	3	3	3	3
+3	1	2	2	2	2
+3	2	3	3	3	3
+3	3	4	4	4	4
+3	4	5	5	5	5
+3	5	5	5	5	5
+PREHOOK: query: select a, b,
+last_value(b) over (partition by a order by b desc  rows between 1 preceding and 1 following ) ,
+last_value(b, true) over (partition by a order by b desc rows between 1 preceding and 1 following ) ,
+last_value(b) over (partition by a order by b desc rows between unbounded preceding and 1 following ) ,
+last_value(b, true) over (partition by a order by b desc rows between unbounded preceding and 1 following ) 
+from wtest
+PREHOOK: type: QUERY
+PREHOOK: Input: default@wtest
+#### A masked pattern was here ####
+POSTHOOK: query: select a, b,
+last_value(b) over (partition by a order by b desc  rows between 1 preceding and 1 following ) ,
+last_value(b, true) over (partition by a order by b desc rows between 1 preceding and 1 following ) ,
+last_value(b) over (partition by a order by b desc rows between unbounded preceding and 1 following ) ,
+last_value(b, true) over (partition by a order by b desc rows between unbounded preceding and 1 following ) 
+from wtest
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@wtest
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+1	NULL	NULL	NULL	NULL	NULL
+2	3	2	2	2	2
+2	2	1	1	1	1
+2	1	NULL	1	NULL	1
+2	NULL	NULL	1	NULL	1
+2	NULL	NULL	NULL	NULL	1
+3	5	4	4	4	4
+3	4	3	3	3	3
+3	3	2	2	2	2
+3	2	1	1	1	1
+3	1	1	1	1	1

Modified: hive/branches/cbo/service/src/java/org/apache/hive/service/cli/HiveSQLException.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/service/src/java/org/apache/hive/service/cli/HiveSQLException.java?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/service/src/java/org/apache/hive/service/cli/HiveSQLException.java (original)
+++ hive/branches/cbo/service/src/java/org/apache/hive/service/cli/HiveSQLException.java Wed Jul  9 03:06:21 2014
@@ -19,6 +19,8 @@
 package org.apache.hive.service.cli;
 
 import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.hive.service.cli.thrift.TStatus;
 import org.apache.hive.service.cli.thrift.TStatusCode;
@@ -101,7 +103,10 @@ public class HiveSQLException extends SQ
 
   public HiveSQLException(TStatus status) {
     // TODO: set correct vendorCode field
-    super(status.getErrorMessage(), status.getSqlState(), 1);
+    super(status.getErrorMessage(), status.getSqlState(), status.getErrorCode());
+    if (status.getInfoMessages() != null) {
+      initCause(toCause(status.getInfoMessages()));
+    }
   }
 
   public TStatus toTStatus() {
@@ -110,6 +115,7 @@ public class HiveSQLException extends SQ
     tStatus.setSqlState(getSQLState());
     tStatus.setErrorCode(getErrorCode());
     tStatus.setErrorMessage(getMessage());
+    tStatus.setInfoMessages(toString(this));
     return tStatus;
   }
 
@@ -119,7 +125,101 @@ public class HiveSQLException extends SQ
     }
     TStatus tStatus = new TStatus(TStatusCode.ERROR_STATUS);
     tStatus.setErrorMessage(e.getMessage());
+    tStatus.setInfoMessages(toString(e));
     return tStatus;
   }
 
+  public static List<String> toString(Throwable ex) {
+    return toString(ex, null);
+  }
+
+  static List<String> toString(Throwable cause, StackTraceElement[] parent) {
+    StackTraceElement[] trace = cause.getStackTrace();
+    int m = trace.length - 1;
+    if (parent != null) {
+      int n = parent.length - 1;
+      while (m >= 0 && n >= 0 && trace[m].equals(parent[n])) {
+        m--; n--;
+      }
+    }
+    List<String> detail = enroll(cause, trace, m);
+    cause = cause.getCause();
+    if (cause != null) {
+      detail.addAll(toString(cause, trace));
+    }
+    return detail;
+  }
+
+  static List<String> enroll(Throwable ex, StackTraceElement[] trace, int max) {
+    List<String> details = new ArrayList<String>();
+    StringBuilder builder = new StringBuilder();
+    builder.append('*').append(ex.getClass().getName()).append(':');
+    builder.append(ex.getMessage()).append(':');
+    builder.append(trace.length).append(':').append(max);
+    details.add(builder.toString());
+    for (int i = 0; i <= max; i++) {
+      builder.setLength(0);
+      builder.append(trace[i].getClassName()).append(':');
+      builder.append(trace[i].getMethodName()).append(':');
+      String fileName = trace[i].getFileName();
+      builder.append(fileName == null ? "" : fileName).append(':');
+      builder.append(trace[i].getLineNumber());
+      details.add(builder.toString());
+    }
+    return details;
+  }
+
+  public static Throwable toCause(List<String> details) {
+    return toStackTrace(details, null, 0);
+  }
+
+  static Throwable toStackTrace(List<String> details, StackTraceElement[] parent, int index) {
+    String detail = details.get(index++);
+    if (!detail.startsWith("*")) {
+      return null;  // should not be happened. ignore remaining
+    }
+    int i1 = detail.indexOf(':');
+    int i3 = detail.lastIndexOf(':');
+    int i2 = detail.substring(0, i3).lastIndexOf(':');
+    String exceptionClass = detail.substring(1, i1);
+    String exceptionMessage = detail.substring(i1 + 1, i2);
+    Throwable ex = newInstance(exceptionClass, exceptionMessage);
+
+    Integer length = Integer.valueOf(detail.substring(i2 + 1, i3));
+    Integer unique = Integer.valueOf(detail.substring(i3 + 1));
+
+    int i = 0;
+    StackTraceElement[] trace = new StackTraceElement[length];
+    for (; i <= unique; i++) {
+      detail = details.get(index++);
+      int j1 = detail.indexOf(':');
+      int j3 = detail.lastIndexOf(':');
+      int j2 = detail.substring(0, j3).lastIndexOf(':');
+      String className = detail.substring(0, j1);
+      String methodName = detail.substring(j1 + 1, j2);
+      String fileName = detail.substring(j2 + 1, j3);
+      if (fileName.isEmpty()) {
+        fileName = null;
+      }
+      int lineNumber = Integer.valueOf(detail.substring(j3 + 1));
+      trace[i] = new StackTraceElement(className, methodName, fileName, lineNumber);
+    }
+    int common = trace.length - i;
+    if (common > 0) {
+      System.arraycopy(parent, parent.length - common, trace, trace.length - common, common);
+    }
+    if (details.size() > index) {
+      ex.initCause(toStackTrace(details, trace, index));
+    }
+    ex.setStackTrace(trace);
+    return ex;
+  }
+
+  private static Throwable newInstance(String className, String message) {
+    try {
+      return (Throwable)Class.forName(className).getConstructor(String.class).newInstance(message);
+    } catch (Exception e) {
+      return new RuntimeException(className + ":" + message);
+    }
+  }
 }

Modified: hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java (original)
+++ hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java Wed Jul  9 03:06:21 2014
@@ -47,7 +47,6 @@ import org.apache.hive.service.cli.sessi
  * Executes a HiveCommand
  */
 public class HiveCommandOperation extends ExecuteStatementOperation {
-  private CommandProcessorResponse response;
   private CommandProcessor commandProcessor;
   private TableSchema resultSchema = null;
 
@@ -106,11 +105,10 @@ public class HiveCommandOperation extend
       String[] tokens = statement.split("\\s");
       String commandArgs = command.substring(tokens[0].length()).trim();
 
-      response = commandProcessor.run(commandArgs);
+      CommandProcessorResponse response = commandProcessor.run(commandArgs);
       int returnCode = response.getResponseCode();
       if (returnCode != 0) {
-        throw new HiveSQLException("Error while processing statement: "
-            + response.getErrorMessage(), response.getSQLState(), response.getResponseCode());
+        throw toSQLException("Error while processing statement", response);
       }
       Schema schema = response.getSchema();
       if (schema != null) {
@@ -169,7 +167,6 @@ public class HiveCommandOperation extend
   /**
    * Reads the temporary results for non-Hive (non-Driver) commands to the
    * resulting List of strings.
-   * @param results list of strings containing the results
    * @param nLines number of lines read at once. If it is <= 0, then read all lines.
    */
   private List<String> readResults(int nLines) throws HiveSQLException {

Modified: hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/Operation.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/Operation.java?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/Operation.java (original)
+++ hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/Operation.java Wed Jul  9 03:06:21 2014
@@ -23,6 +23,7 @@ import java.util.concurrent.Future;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse;
 import org.apache.hive.service.cli.FetchOrientation;
 import org.apache.hive.service.cli.HiveSQLException;
 import org.apache.hive.service.cli.OperationHandle;
@@ -178,4 +179,13 @@ public abstract class Operation {
           " is not supported for this resultset", "HY106");
     }
   }
+
+  protected HiveSQLException toSQLException(String prefix, CommandProcessorResponse response) {
+    HiveSQLException ex = new HiveSQLException(prefix + ": " + response.getErrorMessage(),
+        response.getSQLState(), response.getResponseCode());
+    if (response.getException() != null) {
+      ex.initCause(response.getException());
+    }
+    return ex;
+  }
 }

Modified: hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java?rev=1608997&r1=1608996&r2=1608997&view=diff
==============================================================================
--- hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java (original)
+++ hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java Wed Jul  9 03:06:21 2014
@@ -98,8 +98,7 @@ public class SQLOperation extends Execut
       String subStatement = new VariableSubstitution().substitute(sqlOperationConf, statement);
       response = driver.compileAndRespond(subStatement);
       if (0 != response.getResponseCode()) {
-        throw new HiveSQLException("Error while compiling statement: "
-            + response.getErrorMessage(), response.getSQLState(), response.getResponseCode());
+        throw toSQLException("Error while compiling statement", response);
       }
 
       mResultSchema = driver.getSchema();
@@ -143,8 +142,7 @@ public class SQLOperation extends Execut
       driver.setTryCount(Integer.MAX_VALUE);
       response = driver.run();
       if (0 != response.getResponseCode()) {
-        throw new HiveSQLException("Error while processing statement: "
-            + response.getErrorMessage(), response.getSQLState(), response.getResponseCode());
+        throw toSQLException("Error while processing statement", response);
       }
     } catch (HiveSQLException e) {
       // If the operation was cancelled by another thread,



Mime
View raw message