hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [24/50] [abbrv] hive git commit: HIVE-17536 : StatsUtil::getBasicStatForTable doesn't distinguish b/w absence of statistics or zero stats (Vineet Garg, reviewed by Ashutosh Chauhan)
Date Wed, 27 Sep 2017 20:22:59 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/correlationoptimizer5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer5.q.out b/ql/src/test/results/clientpositive/correlationoptimizer5.q.out
index 00bdb4c..8c2e6cf 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer5.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer5.q.out
@@ -116,35 +116,36 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: x
-            Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+            alias: n
+            Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: int)
-                outputColumnNames: _col0
-                Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+                expressions: key (type: int), val (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: string)
           TableScan
-            alias: y
-            Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+            alias: m
+            Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -152,14 +153,18 @@ STAGE PLANS:
           keys:
             0 _col0 (type: int)
             1 _col0 (type: int)
-          outputColumnNames: _col0
-          Statistics: Num rows: 1598 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
-          File Output Operator
-            compressed: false
-            table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+          outputColumnNames: _col1, _col2
+          Statistics: Num rows: 1 Data size: 308 Basic stats: COMPLETE Column stats: NONE
+          Select Operator
+            expressions: _col2 (type: int), _col1 (type: string)
+            outputColumnNames: _col0, _col1
+            Statistics: Num rows: 1 Data size: 308 Basic stats: COMPLETE Column stats: NONE
+            File Output Operator
+              compressed: false
+              table:
+                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
 
   Stage: Stage-2
     Map Reduce
@@ -169,14 +174,14 @@ STAGE PLANS:
               key expressions: _col0 (type: int)
               sort order: +
               Map-reduce partition columns: _col0 (type: int)
-              Statistics: Num rows: 1598 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 308 Basic stats: COMPLETE Column stats: NONE
+              value expressions: _col1 (type: string)
           TableScan
             Reduce Output Operator
               key expressions: _col0 (type: int)
               sort order: +
               Map-reduce partition columns: _col0 (type: int)
-              Statistics: Num rows: 59 Data size: 237 Basic stats: COMPLETE Column stats: NONE
-              value expressions: _col1 (type: string)
+              Statistics: Num rows: 1 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -184,15 +189,15 @@ STAGE PLANS:
           keys:
             0 _col0 (type: int)
             1 _col0 (type: int)
-          outputColumnNames: _col0, _col2
-          Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+          outputColumnNames: _col1, _col2
+          Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col0 (type: int), _col2 (type: string)
+            expressions: _col2 (type: int), _col1 (type: string)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -216,36 +221,35 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: m
-            Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+            alias: x
+            Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: n
-            Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+            alias: y
+            Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: int), val (type: string)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+                expressions: key (type: int)
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: string)
+                  Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -253,18 +257,14 @@ STAGE PLANS:
           keys:
             0 _col0 (type: int)
             1 _col0 (type: int)
-          outputColumnNames: _col0, _col2
-          Statistics: Num rows: 59 Data size: 237 Basic stats: COMPLETE Column stats: NONE
-          Select Operator
-            expressions: _col0 (type: int), _col2 (type: string)
-            outputColumnNames: _col0, _col1
-            Statistics: Num rows: 59 Data size: 237 Basic stats: COMPLETE Column stats: NONE
-            File Output Operator
-              compressed: false
-              table:
-                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+          outputColumnNames: _col0
+          Statistics: Num rows: 1 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
+          File Output Operator
+            compressed: false
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
 
 PREHOOK: query: INSERT OVERWRITE TABLE dest_co1
 SELECT b.key, d.val
@@ -322,109 +322,79 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: x
-            Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+            alias: n
+            Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: int)
-                outputColumnNames: _col0
-                Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+                expressions: key (type: int), val (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col1 (type: string)
           TableScan
-            alias: y
-            Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+            alias: m
+            Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: m
-            Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+            alias: x
+            Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
           TableScan
-            alias: n
-            Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+            alias: y
+            Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: int), val (type: string)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+                expressions: key (type: int)
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col1 (type: string)
+                  Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Demux Operator
-          Statistics: Num rows: 2956 Data size: 12099 Basic stats: COMPLETE Column stats: NONE
-          Join Operator
-            condition map:
-                 Inner Join 0 to 1
-            keys:
-              0 _col0 (type: int)
-              1 _col0 (type: int)
-            outputColumnNames: _col0
-            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
-            Mux Operator
-              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
-              Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 _col0 (type: int)
-                  1 _col0 (type: int)
-                outputColumnNames: _col0, _col2
-                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: int), _col2 (type: string)
-                  outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    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
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                        name: default.dest_co2
+          Statistics: Num rows: 4 Data size: 12099 Basic stats: COMPLETE Column stats: NONE
           Join Operator
             condition map:
                  Inner Join 0 to 1
             keys:
               0 _col0 (type: int)
               1 _col0 (type: int)
-            outputColumnNames: _col0, _col2
+            outputColumnNames: _col1, _col2
             Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
             Select Operator
-              expressions: _col0 (type: int), _col2 (type: string)
+              expressions: _col2 (type: int), _col1 (type: string)
               outputColumnNames: _col0, _col1
               Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
               Mux Operator
@@ -435,10 +405,10 @@ STAGE PLANS:
                   keys:
                     0 _col0 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col0, _col2
+                  outputColumnNames: _col1, _col2
                   Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                   Select Operator
-                    expressions: _col0 (type: int), _col2 (type: string)
+                    expressions: _col2 (type: int), _col1 (type: string)
                     outputColumnNames: _col0, _col1
                     Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
                     File Output Operator
@@ -449,6 +419,36 @@ STAGE PLANS:
                           output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                           serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                           name: default.dest_co2
+          Join Operator
+            condition map:
+                 Inner Join 0 to 1
+            keys:
+              0 _col0 (type: int)
+              1 _col0 (type: int)
+            outputColumnNames: _col0
+            Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+            Mux Operator
+              Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+              Join Operator
+                condition map:
+                     Inner Join 0 to 1
+                keys:
+                  0 _col0 (type: int)
+                  1 _col0 (type: int)
+                outputColumnNames: _col1, _col2
+                Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                Select Operator
+                  expressions: _col2 (type: int), _col1 (type: string)
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE
+                  File Output Operator
+                    compressed: false
+                    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
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        name: default.dest_co2
 
   Stage: Stage-0
     Move Operator
@@ -527,21 +527,21 @@ STAGE PLANS:
   Stage: Stage-14
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_0:$hdt$_1:y 
+        $hdt$_0:$hdt$_1:m 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_0:$hdt$_1:y 
+        $hdt$_0:$hdt$_1:m 
           TableScan
-            alias: y
-            Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+            alias: m
+            Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 1447 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE
                 HashTable Sink Operator
                   keys:
                     0 _col0 (type: int)
@@ -551,29 +551,33 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: x
-            Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+            alias: n
+            Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: int)
-                outputColumnNames: _col0
-                Statistics: Num rows: 1453 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+                expressions: key (type: int), val (type: string)
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 1 Data size: 280 Basic stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
                   keys:
                     0 _col0 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col0
-                  Statistics: Num rows: 1598 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                  outputColumnNames: _col1, _col2
+                  Statistics: Num rows: 1 Data size: 308 Basic stats: COMPLETE Column stats: NONE
+                  Select Operator
+                    expressions: _col2 (type: int), _col1 (type: string)
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 1 Data size: 308 Basic stats: COMPLETE Column stats: NONE
+                    File Output Operator
+                      compressed: false
+                      table:
+                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 
@@ -604,15 +608,15 @@ STAGE PLANS:
               keys:
                 0 _col0 (type: int)
                 1 _col0 (type: int)
-              outputColumnNames: _col0, _col2
-              Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+              outputColumnNames: _col1, _col2
+              Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: _col0 (type: int), _col2 (type: string)
+                expressions: _col2 (type: int), _col1 (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.mapred.TextInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -658,15 +662,15 @@ STAGE PLANS:
               keys:
                 0 _col0 (type: int)
                 1 _col0 (type: int)
-              outputColumnNames: _col0, _col2
-              Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+              outputColumnNames: _col1, _col2
+              Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: _col0 (type: int), _col2 (type: string)
+                expressions: _col2 (type: int), _col1 (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.mapred.TextInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -683,14 +687,14 @@ STAGE PLANS:
               key expressions: _col0 (type: int)
               sort order: +
               Map-reduce partition columns: _col0 (type: int)
-              Statistics: Num rows: 1598 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 308 Basic stats: COMPLETE Column stats: NONE
+              value expressions: _col1 (type: string)
           TableScan
             Reduce Output Operator
               key expressions: _col0 (type: int)
               sort order: +
               Map-reduce partition columns: _col0 (type: int)
-              Statistics: Num rows: 59 Data size: 237 Basic stats: COMPLETE Column stats: NONE
-              value expressions: _col1 (type: string)
+              Statistics: Num rows: 1 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -698,15 +702,15 @@ STAGE PLANS:
           keys:
             0 _col0 (type: int)
             1 _col0 (type: int)
-          outputColumnNames: _col0, _col2
-          Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+          outputColumnNames: _col1, _col2
+          Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
           Select Operator
-            expressions: _col0 (type: int), _col2 (type: string)
+            expressions: _col2 (type: int), _col1 (type: string)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 1757 Data size: 7032 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -716,21 +720,21 @@ STAGE PLANS:
   Stage: Stage-15
     Map Reduce Local Work
       Alias -> Map Local Tables:
-        $hdt$_1:$hdt$_1:m 
+        $hdt$_1:$hdt$_2:y 
           Fetch Operator
             limit: -1
       Alias -> Map Local Operator Tree:
-        $hdt$_1:$hdt$_1:m 
+        $hdt$_1:$hdt$_2:y 
           TableScan
-            alias: m
-            Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+            alias: y
+            Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: int)
                 outputColumnNames: _col0
-                Statistics: Num rows: 54 Data size: 216 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 5791 Basic stats: COMPLETE Column stats: NONE
                 HashTable Sink Operator
                   keys:
                     0 _col0 (type: int)
@@ -740,33 +744,29 @@ STAGE PLANS:
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: n
-            Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+            alias: x
+            Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: int), val (type: string)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 2 Data size: 280 Basic stats: COMPLETE Column stats: NONE
+                expressions: key (type: int)
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
                   keys:
                     0 _col0 (type: int)
                     1 _col0 (type: int)
-                  outputColumnNames: _col0, _col2
-                  Statistics: Num rows: 59 Data size: 237 Basic stats: COMPLETE Column stats: NONE
-                  Select Operator
-                    expressions: _col0 (type: int), _col2 (type: string)
-                    outputColumnNames: _col0, _col1
-                    Statistics: Num rows: 59 Data size: 237 Basic stats: COMPLETE Column stats: NONE
-                    File Output Operator
-                      compressed: false
-                      table:
-                          input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                          output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                          serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+                  outputColumnNames: _col0
+                  Statistics: Num rows: 1 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
+                  File Output Operator
+                    compressed: false
+                    table:
+                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                        serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
       Local Work:
         Map Reduce Local Work
 

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/decimal_precision.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/decimal_precision.q.out b/ql/src/test/results/clientpositive/decimal_precision.q.out
index d559bfd..b8d73b4 100644
--- a/ql/src/test/results/clientpositive/decimal_precision.q.out
+++ b/ql/src/test/results/clientpositive/decimal_precision.q.out
@@ -536,11 +536,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_precision
-            Statistics: Num rows: 23 Data size: 2661 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2661 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: dec (type: decimal(20,10))
               outputColumnNames: dec
-              Statistics: Num rows: 23 Data size: 2661 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2661 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: avg(dec), sum(dec)
                 mode: hash

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/decimal_udf.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/decimal_udf.q.out b/ql/src/test/results/clientpositive/decimal_udf.q.out
index 8bda27a..086f38c 100644
--- a/ql/src/test/results/clientpositive/decimal_udf.q.out
+++ b/ql/src/test/results/clientpositive/decimal_udf.q.out
@@ -38,11 +38,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (key + key) (type: decimal(21,10))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key + key FROM DECIMAL_UDF
@@ -105,11 +105,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (key + CAST( value AS decimal(10,0))) (type: decimal(21,10))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key + value FROM DECIMAL_UDF
@@ -172,11 +172,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (UDFToDouble(key) + (UDFToDouble(value) / 2.0)) (type: double)
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key + (value/2) FROM DECIMAL_UDF
@@ -239,11 +239,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (UDFToDouble(key) + 1.0) (type: double)
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key + '1.0' FROM DECIMAL_UDF
@@ -306,11 +306,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (key - key) (type: decimal(21,10))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key - key FROM DECIMAL_UDF
@@ -373,11 +373,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (key - CAST( value AS decimal(10,0))) (type: decimal(21,10))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key - value FROM DECIMAL_UDF
@@ -440,11 +440,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (UDFToDouble(key) - (UDFToDouble(value) / 2.0)) (type: double)
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key - (value/2) FROM DECIMAL_UDF
@@ -507,11 +507,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (UDFToDouble(key) - 1.0) (type: double)
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key - '1.0' FROM DECIMAL_UDF
@@ -574,11 +574,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (key * key) (type: decimal(38,17))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key * key FROM DECIMAL_UDF
@@ -641,14 +641,14 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             predicate: ((key * CAST( value AS decimal(10,0))) > 0) (type: boolean)
-            Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: decimal(20,10)), value (type: int)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               ListSink
 
 PREHOOK: query: SELECT key, value FROM DECIMAL_UDF where key * value > 0
@@ -696,11 +696,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (key * CAST( value AS decimal(10,0))) (type: decimal(31,10))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key * value FROM DECIMAL_UDF
@@ -763,11 +763,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (UDFToDouble(key) * (UDFToDouble(value) / 2.0)) (type: double)
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key * (value/2) FROM DECIMAL_UDF
@@ -830,11 +830,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (UDFToDouble(key) * 2.0) (type: double)
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT key * '2.0' FROM DECIMAL_UDF
@@ -897,14 +897,14 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (key / 0) (type: decimal(22,12))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Limit
               Number of rows: 1
-              Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               ListSink
 
 PREHOOK: query: SELECT key / 0 FROM DECIMAL_UDF limit 1
@@ -930,14 +930,14 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (UDFToDouble(key) / null) (type: double)
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Limit
               Number of rows: 1
-              Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               ListSink
 
 PREHOOK: query: SELECT key / NULL FROM DECIMAL_UDF limit 1
@@ -963,14 +963,14 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             predicate: (key <> 0) (type: boolean)
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: (key / key) (type: decimal(38,18))
               outputColumnNames: _col0
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               ListSink
 
 PREHOOK: query: SELECT key / key FROM DECIMAL_UDF WHERE key is not null and key <> 0
@@ -1029,14 +1029,14 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             predicate: (value <> 0) (type: boolean)
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: (key / CAST( value AS decimal(10,0))) (type: decimal(31,21))
               outputColumnNames: _col0
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               ListSink
 
 PREHOOK: query: SELECT key / value FROM DECIMAL_UDF WHERE value is not null and value <> 0
@@ -1085,14 +1085,14 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
             predicate: (value <> 0) (type: boolean)
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: (UDFToDouble(key) / (UDFToDouble(value) / 2.0)) (type: double)
               outputColumnNames: _col0
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               ListSink
 
 PREHOOK: query: SELECT key / (value/2) FROM DECIMAL_UDF  WHERE value is not null and value <> 0
@@ -1141,11 +1141,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (1.0 + (UDFToDouble(key) / 2.0)) (type: double)
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT 1 + (key / '2.0') FROM DECIMAL_UDF
@@ -1208,11 +1208,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: abs(key) (type: decimal(20,10))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT abs(key) FROM DECIMAL_UDF
@@ -1276,22 +1276,22 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_udf
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: decimal(20,10)), value (type: int)
               outputColumnNames: key, value
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: sum(key), count(key), avg(key)
                 keys: value (type: int)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2, _col3
-                Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: decimal(30,10)), _col2 (type: bigint), _col3 (type: struct<count:bigint,sum:decimal(30,10),input:decimal(20,10)>)
       Reduce Operator Tree:
         Group By Operator
@@ -1299,11 +1299,11 @@ STAGE PLANS:
           keys: KEY._col0 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: _col0 (type: int), (_col1 / CAST( _col2 AS decimal(19,0))) (type: decimal(38,18)), _col3 (type: decimal(24,14)), _col1 (type: decimal(30,10))
             outputColumnNames: _col0, _col1, _col2, _col3
-            Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
               table:
@@ -1318,16 +1318,16 @@ STAGE PLANS:
             Reduce Output Operator
               key expressions: _col0 (type: int)
               sort order: +
-              Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               value expressions: _col1 (type: decimal(38,18)), _col2 (type: decimal(24,14)), _col3 (type: decimal(30,10))
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: decimal(38,18)), VALUE._col1 (type: decimal(24,14)), VALUE._col2 (type: decimal(30,10))
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1378,11 +1378,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: (- key) (type: decimal(20,10))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT -key FROM DECIMAL_UDF
@@ -1445,11 +1445,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: key (type: decimal(20,10))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT +key FROM DECIMAL_UDF
@@ -1512,11 +1512,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: ceil(key) (type: decimal(11,0))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT CEIL(key) FROM DECIMAL_UDF
@@ -1579,11 +1579,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: floor(key) (type: decimal(11,0))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT FLOOR(key) FROM DECIMAL_UDF
@@ -1646,11 +1646,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: round(key, 2) (type: decimal(13,2))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT ROUND(key, 2) FROM DECIMAL_UDF
@@ -1713,11 +1713,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: power(key, 2) (type: double)
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT POWER(key, 2) FROM DECIMAL_UDF
@@ -1780,11 +1780,11 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: decimal_udf
-          Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: ((key + 1) % (key / 2)) (type: decimal(22,12))
             outputColumnNames: _col0
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             ListSink
 
 PREHOOK: query: SELECT (key + 1) % (key / 2) FROM DECIMAL_UDF
@@ -1847,22 +1847,22 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_udf
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: decimal(20,10)), value (type: int)
               outputColumnNames: key, value
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: stddev(key), variance(key)
                 keys: value (type: int)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: struct<count:bigint,sum:double,variance:double>), _col2 (type: struct<count:bigint,sum:double,variance:double>)
       Reduce Operator Tree:
         Group By Operator
@@ -1870,10 +1870,10 @@ STAGE PLANS:
           keys: KEY._col0 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1924,22 +1924,22 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_udf
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: decimal(20,10)), value (type: int)
               outputColumnNames: key, value
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: stddev_samp(key), var_samp(key)
                 keys: value (type: int)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: struct<count:bigint,sum:double,variance:double>), _col2 (type: struct<count:bigint,sum:double,variance:double>)
       Reduce Operator Tree:
         Group By Operator
@@ -1947,10 +1947,10 @@ STAGE PLANS:
           keys: KEY._col0 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -2001,11 +2001,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_udf
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: decimal(20,10))
               outputColumnNames: _col0
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: histogram_numeric(_col0, 3)
                 mode: hash
@@ -2058,11 +2058,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_udf
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: decimal(20,10))
               outputColumnNames: key
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: min(key)
                 mode: hash
@@ -2115,11 +2115,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_udf
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: decimal(20,10))
               outputColumnNames: key
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: max(key)
                 mode: hash
@@ -2172,11 +2172,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_udf
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: decimal(20,10))
               outputColumnNames: key
-              Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: count(key)
                 mode: hash

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/decimal_udf2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/decimal_udf2.q.out b/ql/src/test/results/clientpositive/decimal_udf2.q.out
index 6ef4a89..225e550 100644
--- a/ql/src/test/results/clientpositive/decimal_udf2.q.out
+++ b/ql/src/test/results/clientpositive/decimal_udf2.q.out
@@ -42,17 +42,17 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_udf2
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (key = 10) (type: boolean)
-              Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: NaN (type: double), NaN (type: double), 1.4711276743037347 (type: double), -0.8390715290764524 (type: double), -0.5440211108893698 (type: double), 0.6483608274590866 (type: double), 0.17453292519943295 (type: double)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
-                Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -99,17 +99,17 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: decimal_udf2
-            Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: (key = 10) (type: boolean)
-              Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: 22026.465794806718 (type: double), 2.302585092994046 (type: double), 2.302585092994046 (type: double), 1.0 (type: double), log(10, value) (type: double), log(value, 10) (type: double), 1.0 (type: double), 3.1622776601683795 (type: double)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
-                Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 359 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out b/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out
index 8cbed9a..f17e7bd 100644
--- a/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out
+++ b/ql/src/test/results/clientpositive/display_colstats_tbllvl.q.out
@@ -70,11 +70,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: uservisits_web_text_none
-            Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 7060 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: sourceip (type: string), adrevenue (type: float), avgtimeonsite (type: int)
               outputColumnNames: sourceip, adrevenue, avgtimeonsite
-              Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 7060 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: compute_stats(sourceip, 'hll'), compute_stats(avgtimeonsite, 'hll'), compute_stats(adrevenue, 'hll')
                 mode: hash
@@ -121,12 +121,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: uservisits_web_text_none
-            Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 7060 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Select Operator
               expressions: sourceip (type: string), adrevenue (type: float), avgtimeonsite (type: int)
               outputColumnNames: sourceip, adrevenue, avgtimeonsite
-              Statistics: Num rows: 65 Data size: 7060 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 7060 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: compute_stats(sourceip, 'hll'), compute_stats(avgtimeonsite, 'hll'), compute_stats(adrevenue, 'hll')
                 mode: hash

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/distinct_windowing.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/distinct_windowing.q.out b/ql/src/test/results/clientpositive/distinct_windowing.q.out
index 197687a..09fb24c 100644
--- a/ql/src/test/results/clientpositive/distinct_windowing.q.out
+++ b/ql/src/test/results/clientpositive/distinct_windowing.q.out
@@ -61,18 +61,18 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: over10k
-            Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
             Reduce Output Operator
               key expressions: si (type: smallint), i (type: int)
               sort order: ++
               Map-reduce partition columns: si (type: smallint)
-              Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               value expressions: t (type: tinyint)
       Reduce Operator Tree:
         Select Operator
           expressions: VALUE._col0 (type: tinyint), KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey1 (type: int)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
           PTF Operator
             Function definitions:
                 Input definition
@@ -92,16 +92,16 @@ STAGE PLANS:
                         name: first_value
                         window function: GenericUDAFFirstValueEvaluator
                         window frame: RANGE PRECEDING(MAX)~CURRENT
-            Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: first_value_window_0 (type: tinyint)
               outputColumnNames: _col0
-              Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 keys: _col0 (type: tinyint)
                 mode: hash
                 outputColumnNames: _col0
-                Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
                   table:
@@ -117,20 +117,20 @@ STAGE PLANS:
               key expressions: _col0 (type: tinyint)
               sort order: +
               Map-reduce partition columns: _col0 (type: tinyint)
-              Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               TopN Hash Memory Usage: 0.1
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: tinyint)
           mode: mergepartial
           outputColumnNames: _col0
-          Statistics: Num rows: 42397 Data size: 508765 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
           Limit
             Number of rows: 10
-            Statistics: Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -179,17 +179,17 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: over10k
-            Statistics: Num rows: 127193 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
             Reduce Output Operator
               key expressions: si (type: smallint), i (type: int)
               sort order: ++
               Map-reduce partition columns: si (type: smallint)
-              Statistics: Num rows: 127193 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Select Operator
           expressions: KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey1 (type: int)
           outputColumnNames: _col1, _col2
-          Statistics: Num rows: 127193 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
           PTF Operator
             Function definitions:
                 Input definition
@@ -209,16 +209,16 @@ STAGE PLANS:
                         name: last_value
                         window function: GenericUDAFLastValueEvaluator
                         window frame: RANGE PRECEDING(MAX)~CURRENT
-            Statistics: Num rows: 127193 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: last_value_window_0 (type: int)
               outputColumnNames: _col0
-              Statistics: Num rows: 127193 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 keys: _col0 (type: int)
                 mode: hash
                 outputColumnNames: _col0
-                Statistics: Num rows: 127193 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
                   table:
@@ -234,20 +234,20 @@ STAGE PLANS:
               key expressions: _col0 (type: int)
               sort order: +
               Map-reduce partition columns: _col0 (type: int)
-              Statistics: Num rows: 127193 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               TopN Hash Memory Usage: 0.1
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: int)
           mode: mergepartial
           outputColumnNames: _col0
-          Statistics: Num rows: 63596 Data size: 508768 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
           Limit
             Number of rows: 10
-            Statistics: Num rows: 10 Data size: 80 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 10 Data size: 80 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -300,18 +300,18 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: over10k
-            Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
             Reduce Output Operator
               key expressions: si (type: smallint), i (type: int)
               sort order: ++
               Map-reduce partition columns: si (type: smallint)
-              Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               value expressions: t (type: tinyint)
       Reduce Operator Tree:
         Select Operator
           expressions: VALUE._col0 (type: tinyint), KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey1 (type: int)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
           PTF Operator
             Function definitions:
                 Input definition
@@ -337,16 +337,16 @@ STAGE PLANS:
                         name: first_value
                         window function: GenericUDAFFirstValueEvaluator
                         window frame: RANGE PRECEDING(MAX)~CURRENT
-            Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: last_value_window_0 (type: int), first_value_window_1 (type: tinyint)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 keys: _col0 (type: int), _col1 (type: tinyint)
                 mode: hash
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
                   table:
@@ -362,20 +362,20 @@ STAGE PLANS:
               key expressions: _col0 (type: int), _col1 (type: tinyint)
               sort order: ++
               Map-reduce partition columns: _col0 (type: int), _col1 (type: tinyint)
-              Statistics: Num rows: 84795 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               TopN Hash Memory Usage: 0.1
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: int), KEY._col1 (type: tinyint)
           mode: mergepartial
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 42397 Data size: 508765 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
           Limit
             Number of rows: 50
-            Statistics: Num rows: 50 Data size: 600 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 50 Data size: 600 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 1017544 Basic stats: COMPLETE Column stats: NONE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat


Mime
View raw message