hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vg...@apache.org
Subject [23/23] 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 Mon, 25 Sep 2017 21:00:09 GMT
HIVE-17536 : StatsUtil::getBasicStatForTable doesn't distinguish b/w absence of statistics or zero stats (Vineet Garg, reviewed by Ashutosh Chauhan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/6a99cf53
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/6a99cf53
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/6a99cf53

Branch: refs/heads/master
Commit: 6a99cf536168c06d6c0484a82c13e6ca1669dc15
Parents: 5d5b63d
Author: Vineet Garg <vgarg@apache.com>
Authored: Mon Sep 25 13:58:59 2017 -0700
Committer: Vineet Garg <vgarg@apache.com>
Committed: Mon Sep 25 13:58:59 2017 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hive/ql/stats/StatsUtils.java |  12 +-
 .../clientpositive/auto_sortmerge_join_5.q.out  |  42 +--
 .../clientpositive/beeline/smb_mapjoin_1.q.out  |  10 +-
 .../clientpositive/beeline/smb_mapjoin_2.q.out  |  20 +-
 .../clientpositive/beeline/smb_mapjoin_3.q.out  |  10 +-
 .../clientpositive/bucketcontext_5.q.out        |  14 +-
 .../clientpositive/bucketcontext_6.q.out        |   6 +-
 .../results/clientpositive/bucketmapjoin5.q.out |   8 +-
 .../clientpositive/bucketmapjoin_negative.q.out |   4 +-
 .../bucketmapjoin_negative2.q.out               |   4 +-
 .../bucketmapjoin_negative3.q.out               | 126 +++----
 .../results/clientpositive/cbo_rp_join1.q.out   |  64 ++--
 .../cbo_rp_udaf_percentile_approx_23.q.out      |   8 +-
 .../clientpositive/columnstats_tbllvl.q.out     |  24 +-
 .../clientpositive/compute_stats_date.q.out     |   4 +-
 .../clientpositive/correlationoptimizer5.q.out  | 350 +++++++++----------
 .../clientpositive/decimal_precision.q.out      |   4 +-
 .../results/clientpositive/decimal_udf.q.out    | 178 +++++-----
 .../results/clientpositive/decimal_udf2.q.out   |  16 +-
 .../display_colstats_tbllvl.q.out               |   8 +-
 .../clientpositive/distinct_windowing.q.out     |  60 ++--
 .../distinct_windowing_no_cbo.q.out             | 104 +++---
 .../clientpositive/drop_table_with_index.q.out  |  12 +-
 .../encryption_join_unencrypted_tbl.q.out       |   8 +-
 .../clientpositive/filter_cond_pushdown2.q.out  |  42 +--
 .../clientpositive/gen_udf_example_add10.q.out  |  12 +-
 .../test/results/clientpositive/groupby10.q.out |  80 ++---
 .../clientpositive/groupby_grouping_id3.q.out   |  32 +-
 .../groupby_grouping_sets_grouping.q.out        | 222 ++++++------
 .../results/clientpositive/index_serde.q.out    |   8 +-
 .../infer_bucket_sort_map_operators.q.out       |   8 +-
 .../test/results/clientpositive/input22.q.out   |  12 +-
 .../results/clientpositive/input3_limit.q.out   |  16 +-
 ql/src/test/results/clientpositive/input4.q.out |   2 +-
 .../test/results/clientpositive/join_star.q.out | 170 ++++-----
 .../llap/acid_bucket_pruning.q.out              |   8 +-
 .../llap/auto_sortmerge_join_5.q.out            |  46 +--
 .../clientpositive/llap/bucketmapjoin1.q.out    |  16 +-
 .../clientpositive/llap/bucketmapjoin4.q.out    |  44 +--
 .../llap/column_table_stats.q.out               |   4 +-
 .../llap/correlationoptimizer4.q.out            | 324 ++++++++---------
 .../results/clientpositive/llap/count.q.out     | 130 +++----
 .../llap/dynpart_sort_optimization.q.out        | 288 +++++++--------
 .../llap/dynpart_sort_optimization2.q.out       |  52 +--
 .../clientpositive/llap/explainuser_1.q.out     | 106 +++---
 .../llap/join_is_not_distinct_from.q.out        | 102 +++---
 .../clientpositive/llap/join_nullsafe.q.out     | 102 +++---
 .../clientpositive/llap/mapjoin_hint.q.out      |  77 ++--
 .../clientpositive/llap/orc_merge5.q.out        |  16 +-
 .../clientpositive/llap/orc_merge6.q.out        |  16 +-
 .../clientpositive/llap/orc_merge7.q.out        |  12 +-
 .../llap/orc_merge_incompat1.q.out              |   8 +-
 .../llap/orc_merge_incompat2.q.out              |   6 +-
 .../clientpositive/llap/ptf_matchpath.q.out     |  42 +--
 .../clientpositive/llap/smb_mapjoin_4.q.out     | 224 ++++++------
 .../clientpositive/llap/smb_mapjoin_5.q.out     | 224 ++++++------
 .../results/clientpositive/llap/stats11.q.out   |  16 +-
 .../clientpositive/llap/subquery_multi.q.out    | 342 +++++++++---------
 .../clientpositive/llap/subquery_scalar.q.out   | 120 +++----
 .../llap/tez_join_result_complex.q.out          | 212 +++++------
 .../clientpositive/llap/tez_nway_join.q.out     |  90 ++---
 .../llap/vector_windowing_navfn.q.out           |  84 ++---
 .../results/clientpositive/nullscript.q.out     |   8 +-
 .../results/clientpositive/orc_merge5.q.out     |  16 +-
 .../results/clientpositive/orc_merge6.q.out     |  16 +-
 .../clientpositive/orc_merge_incompat1.q.out    |   8 +-
 .../clientpositive/orc_merge_incompat2.q.out    |   6 +-
 .../clientpositive/parallel_orderby.q.out       |  10 +-
 .../results/clientpositive/ptf_matchpath.q.out  |  42 +--
 .../results/clientpositive/smb_mapjoin_1.q.out  |  10 +-
 .../results/clientpositive/smb_mapjoin_2.q.out  |  20 +-
 .../results/clientpositive/smb_mapjoin_25.q.out |  96 ++---
 .../results/clientpositive/smb_mapjoin_3.q.out  |  10 +-
 .../spark/auto_sortmerge_join_5.q.out           |  30 +-
 .../clientpositive/spark/bucketmapjoin1.q.out   |  16 +-
 .../clientpositive/spark/bucketmapjoin4.q.out   |  44 +--
 .../clientpositive/spark/bucketmapjoin5.q.out   |   8 +-
 .../spark/bucketmapjoin_negative.q.out          |   4 +-
 .../spark/bucketmapjoin_negative2.q.out         |   4 +-
 .../spark/bucketmapjoin_negative3.q.out         | 126 +++----
 .../results/clientpositive/spark/count.q.out    | 130 +++----
 .../spark/gen_udf_example_add10.q.out           |  12 +-
 .../clientpositive/spark/groupby10.q.out        |  72 ++--
 .../clientpositive/spark/join_nullsafe.q.out    | 116 +++---
 .../clientpositive/spark/join_star.q.out        | 140 ++++----
 .../clientpositive/spark/orc_merge5.q.out       |  16 +-
 .../clientpositive/spark/orc_merge6.q.out       |  16 +-
 .../clientpositive/spark/orc_merge7.q.out       |  12 +-
 .../spark/orc_merge_incompat1.q.out             |   8 +-
 .../spark/orc_merge_incompat2.q.out             |   6 +-
 .../clientpositive/spark/parallel_orderby.q.out |  10 +-
 .../clientpositive/spark/ptf_matchpath.q.out    |  42 +--
 .../clientpositive/spark/smb_mapjoin_1.q.out    |  58 +--
 .../clientpositive/spark/smb_mapjoin_2.q.out    |  68 ++--
 .../clientpositive/spark/smb_mapjoin_25.q.out   |  80 ++---
 .../clientpositive/spark/smb_mapjoin_3.q.out    |  58 +--
 .../clientpositive/spark/smb_mapjoin_4.q.out    | 224 ++++++------
 .../clientpositive/spark/smb_mapjoin_5.q.out    | 224 ++++++------
 .../spark/spark_explainuser_1.q.out             | 106 +++---
 .../clientpositive/subquery_in_having.q.out     | 312 ++++++++---------
 .../clientpositive/tez/explainanalyze_3.q.out   |   6 +-
 .../clientpositive/tez/explainanalyze_5.q.out   |   8 +-
 .../clientpositive/tez/explainuser_3.q.out      |   6 +-
 .../udaf_percentile_approx_23.q.out             |   8 +-
 .../clientpositive/udf_trunc_number.q.out       |  20 +-
 .../vector_windowing_expressions.q.out          |  74 ++--
 .../vector_windowing_multipartitioning.q.out    | 122 +++----
 .../vector_windowing_order_null.q.out           | 112 +++---
 .../vector_windowing_range_multiorder.q.out     | 152 ++++----
 .../clientpositive/vector_windowing_rank.q.out  | 152 ++++----
 .../vector_windowing_streaming.q.out            |  16 +-
 .../vector_windowing_windowspec.q.out           | 154 ++++----
 .../clientpositive/vectorized_mapjoin2.q.out    |  14 +-
 113 files changed, 3715 insertions(+), 3724 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java
index 778c918..fde8c53 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java
@@ -303,7 +303,8 @@ public class StatsUtils {
     long nr = getNumRows(table);
     // number of rows -1 means that statistics from metastore is not reliable
     // and 0 means statistics gathering is disabled
-    if (nr <= 0) {
+    // estimate only if num rows is -1 since 0 could be actual number of rows
+    if (nr < 0) {
       int avgRowSize = estimateRowSizeFromSchema(conf, schema, neededColumns);
       if (avgRowSize > 0) {
         if (LOG.isDebugEnabled()) {
@@ -312,7 +313,10 @@ public class StatsUtils {
         nr = ds / avgRowSize;
       }
     }
-    return nr == 0 ? 1 : nr;
+    if(nr == 0 || nr == -1) {
+      return 1;
+    }
+    return nr;
   }
 
   public static Statistics collectStatistics(HiveConf conf, PrunedPartitionList partList,
@@ -1775,13 +1779,13 @@ public class StatsUtils {
    */
   public static long getBasicStatForTable(Table table, String statType) {
     Map<String, String> params = table.getParameters();
-    long result = 0;
+    long result = -1;
 
     if (params != null) {
       try {
         result = Long.parseLong(params.get(statType));
       } catch (NumberFormatException e) {
-        result = 0;
+        result = -1;
       }
     }
     return result;

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/auto_sortmerge_join_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/auto_sortmerge_join_5.q.out b/ql/src/test/results/clientpositive/auto_sortmerge_join_5.q.out
index fbbe64e..0e6bbf1 100644
--- a/ql/src/test/results/clientpositive/auto_sortmerge_join_5.q.out
+++ b/ql/src/test/results/clientpositive/auto_sortmerge_join_5.q.out
@@ -76,16 +76,16 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
                 Sorted Merge Bucket Map Join Operator
                   condition map:
                        Inner Join 0 to 1
@@ -216,16 +216,16 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
                 Sorted Merge Bucket Map Join Operator
                   condition map:
                        Inner Join 0 to 1
@@ -369,16 +369,16 @@ STAGE PLANS:
         $hdt$_1:b 
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 226 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 226 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 2 Data size: 226 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 226 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 2 Data size: 226 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 226 Basic stats: COMPLETE Column stats: NONE
                 HashTable Sink Operator
                   keys:
                     0 _col0 (type: string)
@@ -390,16 +390,16 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
@@ -551,16 +551,16 @@ STAGE PLANS:
         $hdt$_0:a 
           TableScan
             alias: a
-            Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
                 HashTable Sink Operator
                   keys:
                     0 _col0 (type: string)
@@ -572,16 +572,16 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 226 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 226 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 2 Data size: 226 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 226 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 2 Data size: 226 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 226 Basic stats: COMPLETE Column stats: NONE
                 Map Join Operator
                   condition map:
                        Inner Join 0 to 1
@@ -728,16 +728,16 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: key (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
                 Sorted Merge Bucket Map Join Operator
                   condition map:
                        Inner Join 0 to 1

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out
index 52314d9..b3f36ad 100644
--- a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_1.q.out
@@ -283,10 +283,10 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
               Sorted Merge Bucket Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -336,7 +336,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Left Outer Join 0 to 1
@@ -391,7 +391,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Right Outer Join 0 to 1
@@ -445,7 +445,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Outer Join 0 to 1

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/beeline/smb_mapjoin_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_2.q.out b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_2.q.out
index 56a38a2..419c8ce 100644
--- a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_2.q.out
+++ b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_2.q.out
@@ -62,10 +62,10 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
               Sorted Merge Bucket Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -117,7 +117,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Left Outer Join 0 to 1
@@ -172,7 +172,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Right Outer Join 0 to 1
@@ -228,7 +228,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Outer Join 0 to 1
@@ -287,10 +287,10 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
               Sorted Merge Bucket Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -342,7 +342,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Left Outer Join 0 to 1
@@ -397,7 +397,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Right Outer Join 0 to 1
@@ -453,7 +453,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 208 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 208 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Outer Join 0 to 1

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/beeline/smb_mapjoin_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_3.q.out b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_3.q.out
index f33b8bb..33c872c 100644
--- a/ql/src/test/results/clientpositive/beeline/smb_mapjoin_3.q.out
+++ b/ql/src/test/results/clientpositive/beeline/smb_mapjoin_3.q.out
@@ -62,10 +62,10 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
               Sorted Merge Bucket Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -117,7 +117,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Left Outer Join 0 to 1
@@ -171,7 +171,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Right Outer Join 0 to 1
@@ -227,7 +227,7 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 222 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 222 Basic stats: COMPLETE Column stats: NONE
             Sorted Merge Bucket Map Join Operator
               condition map:
                    Outer Join 0 to 1

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/bucketcontext_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_5.q.out b/ql/src/test/results/clientpositive/bucketcontext_5.q.out
index 5db684d..1326629 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_5.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_5.q.out
@@ -82,12 +82,12 @@ STAGE PLANS:
         a 
           TableScan
             alias: a
-            Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string)
@@ -106,12 +106,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -119,7 +119,7 @@ STAGE PLANS:
                   0 key (type: string)
                   1 key (type: string)
                 Position of Big Table: 1
-                Statistics: Num rows: 63 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
                 BucketMapJoin: true
                 Group By Operator
                   aggregations: count()
@@ -249,12 +249,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: b
-            Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 27 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               Sorted Merge Bucket Map Join Operator
                 condition map:
                      Inner Join 0 to 1

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/bucketcontext_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketcontext_6.q.out b/ql/src/test/results/clientpositive/bucketcontext_6.q.out
index b3f00a2..069a895 100644
--- a/ql/src/test/results/clientpositive/bucketcontext_6.q.out
+++ b/ql/src/test/results/clientpositive/bucketcontext_6.q.out
@@ -100,12 +100,12 @@ STAGE PLANS:
         a 
           TableScan
             alias: a
-            Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string)
@@ -137,7 +137,7 @@ STAGE PLANS:
                   0 key (type: string)
                   1 key (type: string)
                 Position of Big Table: 1
-                Statistics: Num rows: 63 Data size: 6393 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 59 Data size: 6050 Basic stats: COMPLETE Column stats: NONE
                 BucketMapJoin: true
                 Group By Operator
                   aggregations: count()

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/bucketmapjoin5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin5.q.out b/ql/src/test/results/clientpositive/bucketmapjoin5.q.out
index 4b98993..5657cbf 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin5.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin5.q.out
@@ -196,12 +196,12 @@ STAGE PLANS:
         a 
           TableScan
             alias: a
-            Statistics: Num rows: 26 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 26 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: int)
@@ -737,12 +737,12 @@ STAGE PLANS:
         a 
           TableScan
             alias: a
-            Statistics: Num rows: 26 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 26 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out b/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out
index 97cb1f1..2da33c6 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin_negative.q.out
@@ -161,12 +161,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 26 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 26 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out b/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out
index 724df73..bf1c011 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin_negative2.q.out
@@ -223,12 +223,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 26 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: key is not null (type: boolean)
-              Statistics: Num rows: 26 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 2750 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out b/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out
index 8a74cd2..ece8f76 100644
--- a/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out
+++ b/ql/src/test/results/clientpositive/bucketmapjoin_negative3.q.out
@@ -162,12 +162,12 @@ STAGE PLANS:
         r 
           TableScan
             alias: r
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string), value (type: string)
@@ -186,12 +186,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: l
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -200,18 +200,18 @@ STAGE PLANS:
                   1 key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1, _col5, _col6
                 Position of Big Table: 0
-                Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                 BucketMapJoin: true
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
@@ -310,12 +310,12 @@ STAGE PLANS:
         r 
           TableScan
             alias: r
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string), value (type: string)
@@ -334,12 +334,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: l
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -348,18 +348,18 @@ STAGE PLANS:
                   1 key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1, _col5, _col6
                 Position of Big Table: 0
-                Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                 BucketMapJoin: true
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
@@ -458,12 +458,12 @@ STAGE PLANS:
         r 
           TableScan
             alias: r
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: UDFToDouble(key) is not null (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 (key + key) (type: double)
@@ -475,12 +475,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: l
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key + key) is not null (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -489,17 +489,17 @@ STAGE PLANS:
                   1 UDFToDouble(key) (type: double)
                 outputColumnNames: _col0, _col1, _col5, _col6
                 Position of Big Table: 0
-                Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
@@ -598,12 +598,12 @@ STAGE PLANS:
         r 
           TableScan
             alias: r
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string), value (type: string)
@@ -615,12 +615,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: l
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -629,17 +629,17 @@ STAGE PLANS:
                   1 key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1, _col5, _col6
                 Position of Big Table: 0
-                Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
@@ -738,12 +738,12 @@ STAGE PLANS:
         r 
           TableScan
             alias: r
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string), value (type: string)
@@ -755,12 +755,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: l
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -769,17 +769,17 @@ STAGE PLANS:
                   1 key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1, _col5, _col6
                 Position of Big Table: 0
-                Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
@@ -878,12 +878,12 @@ STAGE PLANS:
         r 
           TableScan
             alias: r
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string), value (type: string)
@@ -895,12 +895,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: l
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -909,17 +909,17 @@ STAGE PLANS:
                   1 key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1, _col5, _col6
                 Position of Big Table: 0
-                Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
@@ -1018,12 +1018,12 @@ STAGE PLANS:
         r 
           TableScan
             alias: r
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string), value (type: string)
@@ -1035,12 +1035,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: l
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -1049,17 +1049,17 @@ STAGE PLANS:
                   1 key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1, _col5, _col6
                 Position of Big Table: 0
-                Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
@@ -1158,12 +1158,12 @@ STAGE PLANS:
         r 
           TableScan
             alias: r
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string), value (type: string)
@@ -1175,12 +1175,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: l
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -1189,17 +1189,17 @@ STAGE PLANS:
                   1 key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1, _col5, _col6
                 Position of Big Table: 0
-                Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
@@ -1298,12 +1298,12 @@ STAGE PLANS:
         r 
           TableScan
             alias: r
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               HashTable Sink Operator
                 keys:
                   0 key (type: string), value (type: string)
@@ -1315,12 +1315,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: l
-            Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
             GatherStats: false
             Filter Operator
               isSamplingPred: false
               predicate: (key is not null and value is not null) (type: boolean)
-              Statistics: Num rows: 21 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 4200 Basic stats: COMPLETE Column stats: NONE
               Map Join Operator
                 condition map:
                      Inner Join 0 to 1
@@ -1329,17 +1329,17 @@ STAGE PLANS:
                   1 key (type: string), value (type: string)
                 outputColumnNames: _col0, _col1, _col5, _col6
                 Position of Big Table: 0
-                Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 23 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4620 Basic stats: COMPLETE Column stats: NONE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_rp_join1.q.out b/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
index df6510c..f439eee 100644
--- a/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
+++ b/ql/src/test/results/clientpositive/cbo_rp_join1.q.out
@@ -30,25 +30,25 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 sort order: 
-                Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
                 value expressions: _col0 (type: int), _col1 (type: int)
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 sort order: 
-                Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
                 value expressions: _col0 (type: int), _col1 (type: int)
       Reduce Operator Tree:
         Join Operator
@@ -61,11 +61,11 @@ STAGE PLANS:
             0 
             1 
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 4 Data size: 92 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 45 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: hash(_col0,_col1,_col2,_col3) (type: int)
             outputColumnNames: _col0
-            Statistics: Num rows: 4 Data size: 92 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 45 Basic stats: COMPLETE Column stats: NONE
             Group By Operator
               aggregations: sum(_col0)
               mode: hash
@@ -132,25 +132,25 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 sort order: 
-                Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
                 value expressions: _col0 (type: int), _col1 (type: int)
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 sort order: 
-                Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
                 value expressions: _col0 (type: int), _col1 (type: int)
       Reduce Operator Tree:
         Join Operator
@@ -163,11 +163,11 @@ STAGE PLANS:
             0 
             1 
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 4 Data size: 92 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 45 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: hash(_col0,_col1,_col2,_col3) (type: int)
             outputColumnNames: _col0
-            Statistics: Num rows: 4 Data size: 92 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 45 Basic stats: COMPLETE Column stats: NONE
             Group By Operator
               aggregations: sum(_col0)
               mode: hash
@@ -234,25 +234,25 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 sort order: 
-                Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
                 value expressions: _col0 (type: int), _col1 (type: int)
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 sort order: 
-                Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
                 value expressions: _col0 (type: int), _col1 (type: int)
       Reduce Operator Tree:
         Join Operator
@@ -265,11 +265,11 @@ STAGE PLANS:
             0 
             1 
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 4 Data size: 92 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 45 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: hash(_col0,_col1,_col2,_col3) (type: int)
             outputColumnNames: _col0
-            Statistics: Num rows: 4 Data size: 92 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 45 Basic stats: COMPLETE Column stats: NONE
             Group By Operator
               aggregations: sum(_col0)
               mode: hash
@@ -336,25 +336,25 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: a
-            Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 sort order: 
-                Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
                 value expressions: _col0 (type: int), _col1 (type: int)
           TableScan
             alias: b
-            Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: int), value (type: int)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 sort order: 
-                Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE
                 value expressions: _col0 (type: int), _col1 (type: int)
       Reduce Operator Tree:
         Join Operator
@@ -367,11 +367,11 @@ STAGE PLANS:
             0 
             1 
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 4 Data size: 92 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 45 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: hash(_col0,_col1,_col2,_col3) (type: int)
             outputColumnNames: _col0
-            Statistics: Num rows: 4 Data size: 92 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 45 Basic stats: COMPLETE Column stats: NONE
             Group By Operator
               aggregations: sum(_col0)
               mode: hash

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/cbo_rp_udaf_percentile_approx_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/cbo_rp_udaf_percentile_approx_23.q.out b/ql/src/test/results/clientpositive/cbo_rp_udaf_percentile_approx_23.q.out
index 12d9c10..de24732 100644
--- a/ql/src/test/results/clientpositive/cbo_rp_udaf_percentile_approx_23.q.out
+++ b/ql/src/test/results/clientpositive/cbo_rp_udaf_percentile_approx_23.q.out
@@ -510,11 +510,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: bucket
-            Statistics: Num rows: 726 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: CASE WHEN ((key < 100.0)) THEN (NaN) ELSE (key) END (type: double)
               outputColumnNames: $f0
-              Statistics: Num rows: 726 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: percentile_approx($f0, 0.5)
                 mode: hash
@@ -569,11 +569,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: bucket
-            Statistics: Num rows: 726 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: key (type: double)
               outputColumnNames: $f0
-              Statistics: Num rows: 726 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: percentile_approx($f0, 0.5)
                 mode: hash

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out b/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
index 25892d8..bcab71a 100644
--- a/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
+++ b/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
@@ -54,11 +54,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
@@ -105,12 +105,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
@@ -236,11 +236,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: uservisits_web_text_none
-            Statistics: Num rows: 9 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), desturl (type: string), visitdate (type: string), adrevenue (type: float), useragent (type: string), ccode (type: string), lcode (type: string), skeyword (type: string), avgtimeonsite (type: int)
               outputColumnNames: sourceip, desturl, visitdate, adrevenue, useragent, ccode, lcode, skeyword, avgtimeonsite
-              Statistics: Num rows: 9 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(desturl, 'hll'), compute_stats(visitdate, 'hll'), compute_stats(adrevenue, 'hll'), compute_stats(useragent, 'hll'), compute_stats(ccode, 'hll'), compute_stats(lcode, 'hll'), compute_stats(skeyword, 'hll'), compute_stats(avgtimeonsite, 'hll')
                 mode: hash
@@ -476,11 +476,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: uservisits_in_dummy_db
-            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
@@ -527,12 +527,12 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: uservisits_in_dummy_db
-            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
@@ -658,11 +658,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: uservisits_in_dummy_db
-            Statistics: Num rows: 9 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), desturl (type: string), visitdate (type: string), adrevenue (type: float), useragent (type: string), ccode (type: string), lcode (type: string), skeyword (type: string), avgtimeonsite (type: int)
               outputColumnNames: sourceip, desturl, visitdate, adrevenue, useragent, ccode, lcode, skeyword, avgtimeonsite
-              Statistics: Num rows: 9 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(desturl, 'hll'), compute_stats(visitdate, 'hll'), compute_stats(adrevenue, 'hll'), compute_stats(useragent, 'hll'), compute_stats(ccode, 'hll'), compute_stats(lcode, 'hll'), compute_stats(skeyword, 'hll'), compute_stats(avgtimeonsite, 'hll')
                 mode: hash

http://git-wip-us.apache.org/repos/asf/hive/blob/6a99cf53/ql/src/test/results/clientpositive/compute_stats_date.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/compute_stats_date.q.out b/ql/src/test/results/clientpositive/compute_stats_date.q.out
index e738c25..7043d52 100644
--- a/ql/src/test/results/clientpositive/compute_stats_date.q.out
+++ b/ql/src/test/results/clientpositive/compute_stats_date.q.out
@@ -60,11 +60,11 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: tab_date
-            Statistics: Num rows: 13 Data size: 778 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 778 Basic stats: COMPLETE Column stats: NONE
             Select Operator
               expressions: fl_date (type: date)
               outputColumnNames: fl_date
-              Statistics: Num rows: 13 Data size: 778 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 778 Basic stats: COMPLETE Column stats: NONE
               Group By Operator
                 aggregations: compute_stats(fl_date, 'hll')
                 mode: hash


Mime
View raw message