You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2019/07/09 15:20:46 UTC

[hive] 01/02: HIVE-21928: Fix for statistics annotation in nested AND expressions (Jesus Camacho Rodriguez, reviewed by Zoltan Haindrich)

This is an automated email from the ASF dual-hosted git repository.

jcamacho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git

commit af77bf342ae93ba21d477cf821a91fb36b80938c
Author: Jesus Camacho Rodriguez <jc...@apache.org>
AuthorDate: Tue Jul 9 08:16:06 2019 -0700

    HIVE-21928: Fix for statistics annotation in nested AND expressions (Jesus Camacho Rodriguez, reviewed by Zoltan Haindrich)
    
    Close apache/hive#700
---
 .../stats/annotation/AnnotateStatsProcCtx.java     |  4 ++
 .../stats/annotation/StatsRulesProcFactory.java    |  6 +-
 .../clientpositive/annotate_stats_join_pkfk.q.out  |  6 +-
 .../clientpositive/correlationoptimizer9.q.out     |  6 +-
 .../clientpositive/filter_join_breaktask.q.out     | 10 +--
 .../results/clientpositive/llap/auto_join29.q.out  | 82 +++++++++++-----------
 .../clientpositive/llap/auto_smb_mapjoin_14.q.out  | 32 ++++-----
 .../llap/auto_sortmerge_join_10.q.out              |  6 +-
 .../llap/auto_sortmerge_join_9.q.out               | 72 +++++++++----------
 .../clientpositive/llap/bucket_map_join_tez2.q.out | 24 +++----
 .../llap/convert_decimal64_to_decimal.q.out        |  4 +-
 .../clientpositive/llap/explainuser_1.q.out        | 48 ++++++-------
 .../clientpositive/llap/explainuser_2.q.out        | 24 +++----
 .../clientpositive/llap/explainuser_4.q.out        | 14 ++--
 .../llap/filter_join_breaktask.q.out               | 12 ++--
 .../llap/groupby_groupingset_bug.q.out             | 61 ++++++++--------
 .../llap/hybridgrace_hashjoin_1.q.out              |  8 +--
 .../llap/hybridgrace_hashjoin_2.q.out              | 20 +++---
 .../test/results/clientpositive/llap/join46.q.out  | 20 +++---
 .../results/clientpositive/llap/mapjoin46.q.out    | 30 ++++----
 .../results/clientpositive/llap/orc_llap.q.out     |  8 +--
 .../clientpositive/llap/reopt_semijoin.q.out       |  4 +-
 .../llap/retry_failure_reorder.q.out               | 14 ++--
 .../results/clientpositive/llap/semijoin6.q.out    | 10 +--
 .../results/clientpositive/llap/semijoin7.q.out    | 10 +--
 .../results/clientpositive/llap/skewjoin.q.out     |  8 +--
 .../clientpositive/llap/smb_mapjoin_14.q.out       | 36 +++++-----
 .../clientpositive/llap/subquery_exists.q.out      |  4 +-
 .../results/clientpositive/llap/subquery_in.q.out  | 26 +++----
 .../clientpositive/llap/subquery_in_having.q.out   | 22 +++---
 .../clientpositive/llap/subquery_multi.q.out       |  6 +-
 .../clientpositive/llap/subquery_scalar.q.out      | 18 ++---
 .../llap/tez_dynpart_hashjoin_1.q.out              |  2 +-
 .../llap/tez_dynpart_hashjoin_2.q.out              | 36 +++++-----
 .../llap/tez_vector_dynpart_hashjoin_1.q.out       |  2 +-
 .../llap/tez_vector_dynpart_hashjoin_2.q.out       | 36 +++++-----
 .../llap/vector_interval_mapjoin.q.out             |  6 +-
 .../llap/vector_left_outer_join.q.out              |  4 +-
 .../llap/vector_mapjoin_reduce.q.out               | 18 ++---
 .../clientpositive/llap/vector_nullsafe_join.q.out | 16 ++---
 .../clientpositive/llap/vector_outer_join0.q.out   |  8 +--
 .../clientpositive/llap/vector_outer_join1.q.out   |  8 +--
 .../clientpositive/llap/vector_outer_join2.q.out   |  6 +-
 .../clientpositive/llap/vector_windowing_gby.q.out |  4 +-
 .../llap/vector_windowing_gby2.q.out               |  4 +-
 .../llap/vectorization_short_regress.q.out         | 30 ++++----
 .../clientpositive/llap/vectorized_join46.q.out    | 10 +--
 .../clientpositive/llap/vectorized_mapjoin.q.out   |  4 +-
 .../llap/vectorized_nested_mapjoin.q.out           |  4 +-
 .../llap/vectorized_shufflejoin.q.out              |  4 +-
 .../clientpositive/llap/windowing_gby.q.out        |  2 +-
 .../test/results/clientpositive/masking_12.q.out   |  6 +-
 .../perf/tez/constraints/query1.q.out              | 28 ++++----
 .../perf/tez/constraints/query10.q.out             | 30 ++++----
 .../perf/tez/constraints/query14.q.out             | 54 +++++++-------
 .../perf/tez/constraints/query17.q.out             | 18 ++---
 .../perf/tez/constraints/query18.q.out             | 16 ++---
 .../perf/tez/constraints/query2.q.out              |  6 +-
 .../perf/tez/constraints/query23.q.out             | 34 ++++-----
 .../perf/tez/constraints/query25.q.out             | 14 ++--
 .../perf/tez/constraints/query26.q.out             | 10 +--
 .../perf/tez/constraints/query27.q.out             | 20 +++---
 .../perf/tez/constraints/query29.q.out             | 14 ++--
 .../perf/tez/constraints/query30.q.out             | 18 ++---
 .../perf/tez/constraints/query33.q.out             | 36 +++++-----
 .../perf/tez/constraints/query35.q.out             | 30 ++++----
 .../perf/tez/constraints/query47.q.out             | 42 +++++------
 .../perf/tez/constraints/query48.q.out             |  8 +--
 .../perf/tez/constraints/query57.q.out             | 42 +++++------
 .../perf/tez/constraints/query59.q.out             | 20 +++---
 .../perf/tez/constraints/query6.q.out              |  8 +--
 .../perf/tez/constraints/query65.q.out             | 28 ++++----
 .../perf/tez/constraints/query69.q.out             | 20 +++---
 .../perf/tez/constraints/query7.q.out              | 10 +--
 .../perf/tez/constraints/query72.q.out             | 32 ++++-----
 .../perf/tez/constraints/query75.q.out             | 12 ++--
 .../perf/tez/constraints/query77.q.out             | 28 ++++----
 .../perf/tez/constraints/query78.q.out             |  8 +--
 .../perf/tez/constraints/query81.q.out             | 22 +++---
 .../perf/tez/constraints/query84.q.out             |  8 +--
 .../perf/tez/constraints/query89.q.out             | 16 ++---
 .../perf/tez/constraints/query91.q.out             | 12 ++--
 .../results/clientpositive/perf/tez/query1.q.out   | 28 ++++----
 .../results/clientpositive/perf/tez/query10.q.out  | 30 ++++----
 .../results/clientpositive/perf/tez/query13.q.out  |  8 +--
 .../results/clientpositive/perf/tez/query14.q.out  | 60 ++++++++--------
 .../results/clientpositive/perf/tez/query17.q.out  | 18 ++---
 .../results/clientpositive/perf/tez/query18.q.out  | 16 ++---
 .../results/clientpositive/perf/tez/query2.q.out   |  6 +-
 .../results/clientpositive/perf/tez/query23.q.out  | 48 ++++++-------
 .../results/clientpositive/perf/tez/query24.q.out  |  2 +-
 .../results/clientpositive/perf/tez/query25.q.out  | 16 ++---
 .../results/clientpositive/perf/tez/query26.q.out  | 10 +--
 .../results/clientpositive/perf/tez/query27.q.out  | 20 +++---
 .../results/clientpositive/perf/tez/query29.q.out  | 18 ++---
 .../results/clientpositive/perf/tez/query30.q.out  | 18 ++---
 .../results/clientpositive/perf/tez/query32.q.out  |  8 +--
 .../results/clientpositive/perf/tez/query33.q.out  | 36 +++++-----
 .../results/clientpositive/perf/tez/query35.q.out  | 30 ++++----
 .../results/clientpositive/perf/tez/query40.q.out  | 32 ++++-----
 .../results/clientpositive/perf/tez/query47.q.out  | 42 +++++------
 .../results/clientpositive/perf/tez/query48.q.out  |  8 +--
 .../results/clientpositive/perf/tez/query49.q.out  | 82 +++++++++++-----------
 .../results/clientpositive/perf/tez/query5.q.out   |  8 +--
 .../results/clientpositive/perf/tez/query50.q.out  | 16 ++---
 .../results/clientpositive/perf/tez/query51.q.out  | 24 +++----
 .../results/clientpositive/perf/tez/query57.q.out  | 42 +++++------
 .../results/clientpositive/perf/tez/query59.q.out  | 20 +++---
 .../results/clientpositive/perf/tez/query6.q.out   | 12 ++--
 .../results/clientpositive/perf/tez/query64.q.out  |  8 +--
 .../results/clientpositive/perf/tez/query65.q.out  | 30 ++++----
 .../results/clientpositive/perf/tez/query69.q.out  | 20 +++---
 .../results/clientpositive/perf/tez/query7.q.out   | 10 +--
 .../results/clientpositive/perf/tez/query72.q.out  | 32 ++++-----
 .../results/clientpositive/perf/tez/query75.q.out  | 12 ++--
 .../results/clientpositive/perf/tez/query77.q.out  | 28 ++++----
 .../results/clientpositive/perf/tez/query78.q.out  |  8 +--
 .../results/clientpositive/perf/tez/query81.q.out  | 22 +++---
 .../results/clientpositive/perf/tez/query84.q.out  |  6 +-
 .../results/clientpositive/perf/tez/query85.q.out  | 14 ++--
 .../results/clientpositive/perf/tez/query89.q.out  | 16 ++---
 .../results/clientpositive/perf/tez/query91.q.out  | 12 ++--
 .../results/clientpositive/perf/tez/query92.q.out  |  8 +--
 .../test/results/clientpositive/ppd_gby_join.q.out | 20 +++---
 ql/src/test/results/clientpositive/ppd_join.q.out  | 12 ++--
 ql/src/test/results/clientpositive/ppd_join2.q.out | 24 +++----
 ql/src/test/results/clientpositive/ppd_join3.q.out | 24 +++----
 .../results/clientpositive/ppd_outer_join4.q.out   | 20 +++---
 .../clientpositive/spark/spark_explainuser_1.q.out | 20 +++---
 .../results/clientpositive/subquery_exists.q.out   |  4 +-
 .../clientpositive/subquery_unqualcolumnrefs.q.out |  8 +--
 .../clientpositive/tez/explainanalyze_4.q.out      | 12 ++--
 .../tez/hybridgrace_hashjoin_1.q.out               |  8 +--
 .../tez/hybridgrace_hashjoin_2.q.out               | 20 +++---
 .../clientpositive/vector_outer_join3.q.out        |  2 +-
 135 files changed, 1290 insertions(+), 1277 deletions(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/AnnotateStatsProcCtx.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/AnnotateStatsProcCtx.java
index 0b7f14f..187ec25 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/AnnotateStatsProcCtx.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/AnnotateStatsProcCtx.java
@@ -77,6 +77,10 @@ public class AnnotateStatsProcCtx implements NodeProcessorCtx {
     affectedColumns.add(column.getColumn());
   }
 
+  public void addAffectedColumns(Set<String> columns) {
+    affectedColumns.addAll(columns);
+  }
+
   public Set<String> getAffectedColumns() {
     return affectedColumns;
   }
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
index 0258e36..4fc7362 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
@@ -334,13 +334,14 @@ public class StatsRulesProcFactory {
 
         // for AND condition cascadingly update stats
         if (udf instanceof GenericUDFOPAnd) {
+          Set<String> affectedColumns = new HashSet<>();
           andStats = stats.clone();
           aspCtx.setAndExprStats(andStats);
+          aspCtx.clearAffectedColumns();
 
           // evaluate children
           long evaluatedRowCount = currNumRows;
           for (ExprNodeDesc child : genFunc.getChildren()) {
-            aspCtx.clearAffectedColumns();
             evaluatedRowCount = evaluateChildExpr(aspCtx.getAndExprStats(), child,
                 aspCtx, neededCols, op, evaluatedRowCount);
             newNumRows = evaluatedRowCount;
@@ -353,7 +354,10 @@ public class StatsRulesProcFactory {
             } else {
               StatsUtils.updateStats(aspCtx.getAndExprStats(), newNumRows, false, op);
             }
+            affectedColumns.addAll(aspCtx.getAffectedColumns());
+            aspCtx.clearAffectedColumns();
           }
+          aspCtx.addAffectedColumns(affectedColumns);
         } else if (udf instanceof GenericUDFOPOr) {
           // for OR condition independently compute and update stats.
           for (ExprNodeDesc child : genFunc.getChildren()) {
diff --git a/ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out b/ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out
index 64b97ee5..709de13 100644
--- a/ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out
+++ b/ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out
@@ -1380,14 +1380,14 @@ STAGE PLANS:
             0 _col0 (type: int)
             1 _col0 (type: int)
           outputColumnNames: _col2
-          Statistics: Num rows: 223 Data size: 892 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 241 Data size: 964 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col2 (type: int)
             outputColumnNames: _col0
-            Statistics: Num rows: 223 Data size: 892 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 241 Data size: 964 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 223 Data size: 892 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 241 Data size: 964 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer9.q.out b/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
index 0c2f78f..506fbe1 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
@@ -443,14 +443,14 @@ STAGE PLANS:
             0 _col0 (type: int), _col1 (type: string)
             1 _col0 (type: int), _col1 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-          Statistics: Num rows: 57 Data size: 11742 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 94 Data size: 19364 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: int), _col1 (type: string), _col3 (type: int), _col4 (type: string), _col2 (type: bigint), _col5 (type: bigint)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-            Statistics: Num rows: 57 Data size: 11742 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 94 Data size: 19364 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 57 Data size: 11742 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 94 Data size: 19364 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/filter_join_breaktask.q.out b/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
index 9fb11d6..ec5d4a1 100644
--- a/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
+++ b/ql/src/test/results/clientpositive/filter_join_breaktask.q.out
@@ -158,7 +158,7 @@ STAGE PLANS:
             0 _col0 (type: int)
             1 _col0 (type: int)
           outputColumnNames: _col0, _col2
-          Statistics: Num rows: 15 Data size: 1375 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 25 Data size: 2305 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
             GlobalTableId: 0
@@ -188,7 +188,7 @@ STAGE PLANS:
               null sort order: a
               sort order: +
               Map-reduce partition columns: _col2 (type: string)
-              Statistics: Num rows: 15 Data size: 1375 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 25 Data size: 2305 Basic stats: COMPLETE Column stats: COMPLETE
               tag: 0
               value expressions: _col0 (type: int)
               auto parallelism: false
@@ -298,17 +298,17 @@ STAGE PLANS:
             0 _col2 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col3
-          Statistics: Num rows: 19 Data size: 1747 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 32 Data size: 2956 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: int), _col3 (type: string)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 19 Data size: 1747 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 32 Data size: 2956 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
               GlobalTableId: 0
 #### A masked pattern was here ####
               NumFilesPerFileSink: 1
-              Statistics: Num rows: 19 Data size: 1747 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 32 Data size: 2956 Basic stats: COMPLETE Column stats: COMPLETE
 #### A masked pattern was here ####
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
diff --git a/ql/src/test/results/clientpositive/llap/auto_join29.q.out b/ql/src/test/results/clientpositive/llap/auto_join29.q.out
index b5f16f3..964bfd9 100644
--- a/ql/src/test/results/clientpositive/llap/auto_join29.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_join29.q.out
@@ -672,15 +672,15 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
                       input vertices:
                         1 Map 4
-                      Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
                       Select Operator
                         expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 (type: string)
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                        Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string)
                           sort order: ++++++
-                          Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Map 3 
@@ -723,10 +723,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1313,15 +1313,15 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
                       input vertices:
                         1 Map 4
-                      Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
                       Select Operator
                         expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 (type: string)
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                        Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string)
                           sort order: ++++++
-                          Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Map 4 
@@ -1347,10 +1347,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 762 Data size: 318086 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1204 Data size: 554114 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -2559,7 +2559,7 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col5, _col6
                       input vertices:
                         1 Map 3
-                      Statistics: Num rows: 55 Data size: 19580 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 86 Data size: 30616 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Left Outer Join 0 to 1
@@ -2569,15 +2569,15 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 110 Data size: 49128 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 221 Data size: 102884 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 (type: string)
                           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                          Statistics: Num rows: 110 Data size: 49128 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 221 Data size: 102884 Basic stats: COMPLETE Column stats: COMPLETE
                           Reduce Output Operator
                             key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string)
                             sort order: ++++++
-                            Statistics: Num rows: 110 Data size: 49128 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 221 Data size: 102884 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Map 3 
@@ -2620,10 +2620,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 110 Data size: 49128 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 221 Data size: 102884 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 110 Data size: 49128 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 221 Data size: 102884 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -2685,12 +2685,12 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col5, _col6
                       input vertices:
                         1 Map 2
-                      Statistics: Num rows: 55 Data size: 19580 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 86 Data size: 30616 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col5 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col5 (type: string)
-                        Statistics: Num rows: 55 Data size: 19580 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 86 Data size: 30616 Basic stats: COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: string), _col1 (type: string), _col6 (type: string)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -2728,15 +2728,15 @@ STAGE PLANS:
                     outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
                     input vertices:
                       0 Map 1
-                    Statistics: Num rows: 587 Data size: 135814 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 636 Data size: 161980 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 (type: string)
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                      Statistics: Num rows: 587 Data size: 135814 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 636 Data size: 161980 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string)
                         sort order: ++++++
-                        Statistics: Num rows: 587 Data size: 135814 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 636 Data size: 161980 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Reducer 4 
@@ -2745,10 +2745,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 587 Data size: 135814 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 636 Data size: 161980 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 587 Data size: 135814 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 636 Data size: 161980 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -3321,15 +3321,15 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 254 Data size: 106088 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 401 Data size: 184586 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 (type: string)
                           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                          Statistics: Num rows: 254 Data size: 106088 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 401 Data size: 184586 Basic stats: COMPLETE Column stats: COMPLETE
                           Reduce Output Operator
                             key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string)
                             sort order: ++++++
-                            Statistics: Num rows: 254 Data size: 106088 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 401 Data size: 184586 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Map 3 
@@ -3372,10 +3372,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 254 Data size: 106088 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 401 Data size: 184586 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 254 Data size: 106088 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 401 Data size: 184586 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -3456,7 +3456,7 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col5, _col6
                       input vertices:
                         0 Map 1
-                      Statistics: Num rows: 166 Data size: 59096 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 262 Data size: 93272 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -3466,15 +3466,15 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 166 Data size: 88644 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 414 Data size: 221076 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 (type: string)
                           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                          Statistics: Num rows: 166 Data size: 88644 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 414 Data size: 221076 Basic stats: COMPLETE Column stats: COMPLETE
                           Reduce Output Operator
                             key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string)
                             sort order: ++++++
-                            Statistics: Num rows: 166 Data size: 88644 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 414 Data size: 221076 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Map 4 
@@ -3500,10 +3500,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 166 Data size: 88644 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 414 Data size: 221076 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 166 Data size: 88644 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 414 Data size: 221076 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -3587,12 +3587,12 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col5, _col6
                       input vertices:
                         1 Map 2
-                      Statistics: Num rows: 55 Data size: 19580 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 86 Data size: 30616 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col5 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col5 (type: string)
-                        Statistics: Num rows: 55 Data size: 19580 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 86 Data size: 30616 Basic stats: COMPLETE Column stats: COMPLETE
                         value expressions: _col0 (type: string), _col1 (type: string), _col6 (type: string)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -3631,15 +3631,15 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
                       input vertices:
                         0 Map 1
-                      Statistics: Num rows: 55 Data size: 29370 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 135 Data size: 72090 Basic stats: COMPLETE Column stats: COMPLETE
                       Select Operator
                         expressions: _col0 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string), _col10 (type: string), _col11 (type: string)
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                        Statistics: Num rows: 55 Data size: 29370 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 135 Data size: 72090 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string)
                           sort order: ++++++
-                          Statistics: Num rows: 55 Data size: 29370 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 135 Data size: 72090 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Reducer 4 
@@ -3648,10 +3648,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 55 Data size: 29370 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 135 Data size: 72090 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 55 Data size: 29370 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 135 Data size: 72090 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/auto_smb_mapjoin_14.q.out b/ql/src/test/results/clientpositive/llap/auto_smb_mapjoin_14.q.out
index 2e2303f..ce49b5f 100644
--- a/ql/src/test/results/clientpositive/llap/auto_smb_mapjoin_14.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_smb_mapjoin_14.q.out
@@ -611,10 +611,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -737,10 +737,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -885,10 +885,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1023,10 +1023,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1269,10 +1269,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1389,12 +1389,12 @@ STAGE PLANS:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
                         outputColumnNames: _col0
-                        Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
                           sort order: +
                           Map-reduce partition columns: _col0 (type: int)
-                          Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
         Map 5 
             Map Operator Tree:
@@ -1425,10 +1425,10 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 6 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
-                  minReductionHashAggr: 0.6666666
+                  minReductionHashAggr: 0.8333333
                   mode: hash
                   outputColumnNames: _col0
                   Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1558,10 +1558,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_10.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_10.q.out
index 2697fc9..7c95815 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_10.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_10.q.out
@@ -152,10 +152,10 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                Statistics: Num rows: 6 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 9 Data size: 72 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
-                  minReductionHashAggr: 0.8333333
+                  minReductionHashAggr: 0.8888889
                   mode: hash
                   outputColumnNames: _col0
                   Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -273,7 +273,7 @@ STAGE PLANS:
                       keys: key (type: int)
                       mode: final
                       outputColumnNames: _col0
-                      Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
                       Merge Join Operator
                         condition map:
                              Inner Join 0 to 1
diff --git a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_9.q.out b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_9.q.out
index 838087d..6ef947b 100644
--- a/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_9.q.out
+++ b/ql/src/test/results/clientpositive/llap/auto_sortmerge_join_9.q.out
@@ -737,10 +737,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -863,10 +863,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1011,10 +1011,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1149,10 +1149,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1395,10 +1395,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1505,10 +1505,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1627,12 +1627,12 @@ STAGE PLANS:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
                         outputColumnNames: _col0
-                        Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
                           sort order: +
                           Map-reduce partition columns: _col0 (type: int)
-                          Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
         Map 5 
             Map Operator Tree:
@@ -1663,10 +1663,10 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 6 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
-                  minReductionHashAggr: 0.6666666
+                  minReductionHashAggr: 0.8333333
                   mode: hash
                   outputColumnNames: _col0
                   Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1796,10 +1796,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -2560,10 +2560,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -2686,10 +2686,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -2834,10 +2834,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -2972,10 +2972,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -3084,10 +3084,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -3194,10 +3194,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -3316,12 +3316,12 @@ STAGE PLANS:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
                         outputColumnNames: _col0
-                        Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
                           sort order: +
                           Map-reduce partition columns: _col0 (type: int)
-                          Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
         Map 5 
             Map Operator Tree:
@@ -3352,10 +3352,10 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 6 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
-                  minReductionHashAggr: 0.6666666
+                  minReductionHashAggr: 0.8333333
                   mode: hash
                   outputColumnNames: _col0
                   Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -3485,10 +3485,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/bucket_map_join_tez2.q.out b/ql/src/test/results/clientpositive/llap/bucket_map_join_tez2.q.out
index aadd8e2..d78171a 100644
--- a/ql/src/test/results/clientpositive/llap/bucket_map_join_tez2.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucket_map_join_tez2.q.out
@@ -712,10 +712,10 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 166 Data size: 1328 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 166 Data size: 1328 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -773,10 +773,10 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1
                         input vertices:
                           1 Map 2
-                        Statistics: Num rows: 166 Data size: 1328 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                         File Output Operator
                           compressed: false
-                          Statistics: Num rows: 166 Data size: 1328 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                           table:
                               input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                               output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -884,10 +884,10 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 332 Data size: 1996 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 332 Data size: 1996 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -945,10 +945,10 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1
                         input vertices:
                           1 Map 2
-                        Statistics: Num rows: 332 Data size: 1996 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                         File Output Operator
                           compressed: false
-                          Statistics: Num rows: 332 Data size: 1996 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                           table:
                               input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                               output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1056,10 +1056,10 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 332 Data size: 1996 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 332 Data size: 1996 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1137,10 +1137,10 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1
                         input vertices:
                           0 Map 1
-                        Statistics: Num rows: 332 Data size: 1996 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                         File Output Operator
                           compressed: false
-                          Statistics: Num rows: 332 Data size: 1996 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 272 Data size: 2176 Basic stats: COMPLETE Column stats: COMPLETE
                           table:
                               input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                               output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/convert_decimal64_to_decimal.q.out b/ql/src/test/results/clientpositive/llap/convert_decimal64_to_decimal.q.out
index 31d8127..2570aed 100644
--- a/ql/src/test/results/clientpositive/llap/convert_decimal64_to_decimal.q.out
+++ b/ql/src/test/results/clientpositive/llap/convert_decimal64_to_decimal.q.out
@@ -196,7 +196,7 @@ STAGE PLANS:
                         outputColumnNames: _col1
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 894 Data size: 3224 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 958 Data size: 3480 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count(_col1)
                           Group By Vectorization:
@@ -412,7 +412,7 @@ STAGE PLANS:
                         outputColumnNames: _col1
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 894 Data size: 3224 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 958 Data size: 3480 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count(_col1)
                           Group By Vectorization:
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
index 5aea1fa..ee50efd 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
@@ -465,7 +465,7 @@ Stage-0
                       <-Reducer 2 [ONE_TO_ONE_EDGE] llap
                         FORWARD [RS_20]
                           PartitionCols:_col3
-                          Merge Join Operator [MERGEJOIN_63] (rows=5 width=104)
+                          Merge Join Operator [MERGEJOIN_63] (rows=2 width=105)
                             Conds:RS_17._col0=RS_18._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5"],residual filter predicates:{((_col4 > 0) or _col2)}
                           <-Map 1 [SIMPLE_EDGE] llap
                             SHUFFLE [RS_17]
@@ -479,9 +479,9 @@ Stage-0
                           <-Reducer 7 [SIMPLE_EDGE] llap
                             SHUFFLE [RS_18]
                               PartitionCols:_col0
-                              Select Operator [SEL_9] (rows=2 width=97)
+                              Select Operator [SEL_9] (rows=1 width=97)
                                 Output:["_col0","_col1","_col2"]
-                                Group By Operator [GBY_8] (rows=2 width=101)
+                                Group By Operator [GBY_8] (rows=1 width=101)
                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                 <-Map 6 [SIMPLE_EDGE] llap
                                   SHUFFLE [RS_7]
@@ -1349,9 +1349,9 @@ Stage-0
     Stage-1
       Reducer 3 llap
       File Output Operator [FS_16]
-        Select Operator [SEL_15] (rows=24 width=100)
+        Select Operator [SEL_15] (rows=39 width=100)
           Output:["_col0","_col1","_col2","_col3","_col4"]
-          Merge Join Operator [MERGEJOIN_49] (rows=24 width=104)
+          Merge Join Operator [MERGEJOIN_49] (rows=39 width=104)
             Conds:RS_12._col0=RS_13._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7"],residual filter predicates:{((_col1 > 0) or _col7)} {((_col1 > 0) or (_col6 >= 0))}
           <-Map 5 [SIMPLE_EDGE] llap
             SHUFFLE [RS_13]
@@ -1365,7 +1365,7 @@ Stage-0
           <-Reducer 2 [ONE_TO_ONE_EDGE] llap
             FORWARD [RS_12]
               PartitionCols:_col0
-              Merge Join Operator [MERGEJOIN_48] (rows=8 width=182)
+              Merge Join Operator [MERGEJOIN_48] (rows=13 width=182)
                 Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4"],residual filter predicates:{((_col1 + _col4) = 2)}
               <-Map 1 [SIMPLE_EDGE] llap
                 SHUFFLE [RS_9]
@@ -1414,9 +1414,9 @@ Stage-0
     Stage-1
       Reducer 3 llap
       File Output Operator [FS_16]
-        Select Operator [SEL_15] (rows=24 width=100)
+        Select Operator [SEL_15] (rows=39 width=100)
           Output:["_col0","_col1","_col2","_col3","_col4"]
-          Merge Join Operator [MERGEJOIN_49] (rows=24 width=104)
+          Merge Join Operator [MERGEJOIN_49] (rows=39 width=104)
             Conds:RS_12._col0=RS_13._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7"],residual filter predicates:{((_col1 > 0) or _col7)} {((_col1 > 0) or (_col6 >= 0))}
           <-Map 5 [SIMPLE_EDGE] llap
             SHUFFLE [RS_13]
@@ -1430,7 +1430,7 @@ Stage-0
           <-Reducer 2 [ONE_TO_ONE_EDGE] llap
             FORWARD [RS_12]
               PartitionCols:_col0
-              Merge Join Operator [MERGEJOIN_48] (rows=8 width=182)
+              Merge Join Operator [MERGEJOIN_48] (rows=13 width=182)
                 Conds:RS_9._col0=RS_10._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4"],residual filter predicates:{((_col1 + _col4) = 2)}
               <-Map 1 [SIMPLE_EDGE] llap
                 SHUFFLE [RS_9]
@@ -2234,7 +2234,7 @@ Stage-0
     Stage-1
       Reducer 2 llap
       File Output Operator [FS_12]
-        Merge Join Operator [MERGEJOIN_37] (rows=83 width=178)
+        Merge Join Operator [MERGEJOIN_37] (rows=131 width=178)
           Conds:RS_8._col0, _col1=RS_9._col0, _col1(Left Semi),Output:["_col0","_col1"]
         <-Map 1 [SIMPLE_EDGE] llap
           SHUFFLE [RS_8]
@@ -2290,7 +2290,7 @@ Stage-0
     Stage-1
       Reducer 2 llap
       File Output Operator [FS_12]
-        Merge Join Operator [MERGEJOIN_37] (rows=83 width=178)
+        Merge Join Operator [MERGEJOIN_37] (rows=131 width=178)
           Conds:RS_8._col0, _col1=RS_9._col0, _col1(Left Semi),Output:["_col0","_col1"]
         <-Map 1 [SIMPLE_EDGE] llap
           SHUFFLE [RS_8]
@@ -2336,7 +2336,7 @@ Stage-0
     Stage-1
       Reducer 2 llap
       File Output Operator [FS_12]
-        Merge Join Operator [MERGEJOIN_27] (rows=83 width=178)
+        Merge Join Operator [MERGEJOIN_27] (rows=131 width=178)
           Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col0","_col1"]
         <-Map 1 [SIMPLE_EDGE] llap
           SHUFFLE [RS_8]
@@ -2385,9 +2385,9 @@ Stage-0
     Stage-1
       Reducer 3 llap
       File Output Operator [FS_21]
-        Select Operator [SEL_20] (rows=1 width=8)
+        Select Operator [SEL_20] (rows=3 width=8)
           Output:["_col0","_col1"]
-          Merge Join Operator [MERGEJOIN_51] (rows=1 width=8)
+          Merge Join Operator [MERGEJOIN_51] (rows=3 width=8)
             Conds:RS_17._col1, _col4=RS_18._col0, _col1(Left Semi),Output:["_col0","_col3"]
           <-Map 5 [SIMPLE_EDGE] llap
             SHUFFLE [RS_18]
@@ -2464,16 +2464,16 @@ Stage-0
         <-Reducer 4 [SIMPLE_EDGE] llap
           SHUFFLE [RS_29]
             PartitionCols:_col2
-            Filter Operator [FIL_39] (rows=41 width=186)
+            Filter Operator [FIL_39] (rows=65 width=186)
               predicate:_col2 is not null
-              Group By Operator [GBY_16] (rows=41 width=186)
+              Group By Operator [GBY_16] (rows=65 width=186)
                 Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1
               <-Reducer 3 [SIMPLE_EDGE] llap
                 SHUFFLE [RS_15]
                   PartitionCols:_col0, _col1
-                  Group By Operator [GBY_14] (rows=41 width=186)
+                  Group By Operator [GBY_14] (rows=65 width=186)
                     Output:["_col0","_col1","_col2"],aggregations:["count()"],keys:_col1, _col2
-                    Merge Join Operator [MERGEJOIN_55] (rows=83 width=178)
+                    Merge Join Operator [MERGEJOIN_55] (rows=131 width=178)
                       Conds:RS_10._col0=RS_11._col0(Inner),Output:["_col1","_col2"]
                     <-Map 7 [SIMPLE_EDGE] llap
                       SHUFFLE [RS_11]
@@ -2704,16 +2704,16 @@ Stage-0
     Stage-1
       Reducer 3 llap
       File Output Operator [FS_24]
-        Select Operator [SEL_23] (rows=38 width=223)
+        Select Operator [SEL_23] (rows=41 width=223)
           Output:["_col0","_col1","_col2"]
-          Filter Operator [FIL_22] (rows=38 width=234)
+          Filter Operator [FIL_22] (rows=41 width=229)
             predicate:((_col8 is null or (_col4 = 0L) or _col4 is null) and ((_col5 < _col4) is not true or (_col4 = 0L) or _col4 is null or _col8 is not null or _col0 is null) and (_col0 is not null or (_col4 = 0L) or _col4 is null or _col8 is not null))
-            Merge Join Operator [MERGEJOIN_45] (rows=38 width=234)
+            Merge Join Operator [MERGEJOIN_45] (rows=41 width=229)
               Conds:RS_19._col0, _col1=RS_20._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col8"]
             <-Reducer 2 [SIMPLE_EDGE] llap
               SHUFFLE [RS_19]
                 PartitionCols:_col0, _col1
-                Merge Join Operator [MERGEJOIN_44] (rows=33 width=233)
+                Merge Join Operator [MERGEJOIN_44] (rows=36 width=227)
                   Conds:RS_16._col1=RS_17._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
                 <-Map 1 [SIMPLE_EDGE] llap
                   SHUFFLE [RS_16]
@@ -2725,12 +2725,12 @@ Stage-0
                 <-Reducer 4 [ONE_TO_ONE_EDGE] llap
                   FORWARD [RS_17]
                     PartitionCols:_col0
-                    Group By Operator [GBY_7] (rows=4 width=114)
+                    Group By Operator [GBY_7] (rows=2 width=114)
                       Output:["_col0","_col1","_col2"],aggregations:["count(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0
                     <-Map 1 [SIMPLE_EDGE] llap
                       SHUFFLE [RS_6]
                         PartitionCols:_col0
-                        Group By Operator [GBY_5] (rows=4 width=114)
+                        Group By Operator [GBY_5] (rows=2 width=114)
                           Output:["_col0","_col1","_col2"],aggregations:["count()","count(p_name)"],keys:p_mfgr
                           Select Operator [SEL_4] (rows=8 width=223)
                             Output:["p_name","p_mfgr"]
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_2.q.out b/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
index 0aadc25..74d8578 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_2.q.out
@@ -336,34 +336,34 @@ Stage-0
     Stage-1
       Reducer 5 vectorized, llap
       File Output Operator [FS_217]
-        Limit [LIM_216] (rows=2 width=285)
+        Limit [LIM_216] (rows=5 width=285)
           Number of rows:100
-          Select Operator [SEL_215] (rows=2 width=285)
+          Select Operator [SEL_215] (rows=5 width=285)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
           <-Reducer 4 [SIMPLE_EDGE] vectorized, llap
             SHUFFLE [RS_214]
-              Group By Operator [GBY_213] (rows=2 width=285)
+              Group By Operator [GBY_213] (rows=5 width=285)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(VALUE._col0)","count(VALUE._col1)","count(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
               <-Reducer 3 [SIMPLE_EDGE] llap
                 SHUFFLE [RS_49]
                   PartitionCols:_col0, _col1, _col2
-                  Group By Operator [GBY_48] (rows=2 width=285)
+                  Group By Operator [GBY_48] (rows=5 width=285)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col8)","count(_col15)","count(_col3)"],keys:_col7, _col14, _col2
-                    Top N Key Operator [TNK_91] (rows=28 width=534)
+                    Top N Key Operator [TNK_91] (rows=4704 width=534)
                       keys:_col7, _col14, _col2,sort order:+++,top n:100
-                      Merge Join Operator [MERGEJOIN_188] (rows=28 width=534)
+                      Merge Join Operator [MERGEJOIN_188] (rows=4704 width=534)
                         Conds:RS_44._col1, _col3=RS_45._col10, _col12(Inner),Output:["_col2","_col3","_col7","_col8","_col14","_col15"]
                       <-Reducer 10 [SIMPLE_EDGE] llap
                         SHUFFLE [RS_45]
                           PartitionCols:_col10, _col12
-                          Select Operator [SEL_40] (rows=2 width=447)
+                          Select Operator [SEL_40] (rows=336 width=447)
                             Output:["_col2","_col3","_col9","_col10","_col12"]
-                            Merge Join Operator [MERGEJOIN_187] (rows=2 width=447)
+                            Merge Join Operator [MERGEJOIN_187] (rows=336 width=447)
                               Conds:RS_37._col2, _col4=RS_38._col1, _col3(Inner),Output:["_col0","_col1","_col9","_col10","_col12"]
                             <-Reducer 11 [SIMPLE_EDGE] llap
                               SHUFFLE [RS_38]
                                 PartitionCols:_col1, _col3
-                                Merge Join Operator [MERGEJOIN_186] (rows=5 width=356)
+                                Merge Join Operator [MERGEJOIN_186] (rows=8 width=356)
                                   Conds:RS_212._col0=RS_200._col0(Inner),Output:["_col1","_col2","_col3","_col4"]
                                 <-Map 6 [SIMPLE_EDGE] vectorized, llap
                                   SHUFFLE [RS_200]
@@ -386,7 +386,7 @@ Stage-0
                             <-Reducer 9 [SIMPLE_EDGE] llap
                               SHUFFLE [RS_37]
                                 PartitionCols:_col2, _col4
-                                Merge Join Operator [MERGEJOIN_185] (rows=2 width=352)
+                                Merge Join Operator [MERGEJOIN_185] (rows=42 width=352)
                                   Conds:RS_34._col1=RS_209._col0(Inner),Output:["_col0","_col1","_col2","_col4"]
                                 <-Map 14 [SIMPLE_EDGE] vectorized, llap
                                   SHUFFLE [RS_209]
@@ -400,7 +400,7 @@ Stage-0
                                 <-Reducer 8 [SIMPLE_EDGE] llap
                                   SHUFFLE [RS_34]
                                     PartitionCols:_col1
-                                    Merge Join Operator [MERGEJOIN_184] (rows=2 width=352)
+                                    Merge Join Operator [MERGEJOIN_184] (rows=42 width=352)
                                       Conds:RS_31._col3=RS_206._col0(Inner),Output:["_col0","_col1","_col2","_col4"]
                                     <-Map 13 [SIMPLE_EDGE] vectorized, llap
                                       SHUFFLE [RS_206]
@@ -414,7 +414,7 @@ Stage-0
                                     <-Reducer 7 [SIMPLE_EDGE] llap
                                       SHUFFLE [RS_31]
                                         PartitionCols:_col3
-                                        Merge Join Operator [MERGEJOIN_183] (rows=2 width=443)
+                                        Merge Join Operator [MERGEJOIN_183] (rows=7 width=443)
                                           Conds:RS_203._col0=RS_199._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4"]
                                         <-Map 6 [SIMPLE_EDGE] vectorized, llap
                                           SHUFFLE [RS_199]
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
index a2e11f9..d7edf0a 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
@@ -30,11 +30,11 @@ Stage-0
     Stage-1
       Reducer 3 vectorized, llap
       File Output Operator [FS_35]
-        Select Operator [SEL_34] (rows=1019 width=484)
+        Select Operator [SEL_34] (rows=2048 width=552)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
         <-Reducer 2 [SIMPLE_EDGE] llap
           SHUFFLE [RS_10]
-            Merge Join Operator [MERGEJOIN_27] (rows=1019 width=484)
+            Merge Join Operator [MERGEJOIN_27] (rows=2048 width=552)
               Conds:RS_30._col2=RS_33._col2(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
             <-Map 1 [SIMPLE_EDGE] vectorized, llap
               SHUFFLE [RS_30]
@@ -119,7 +119,7 @@ Stage-0
           PARTITION_ONLY_SHUFFLE [RS_11]
             Group By Operator [GBY_10] (rows=1 width=8)
               Output:["_col0"],aggregations:["count()"]
-              Merge Join Operator [MERGEJOIN_29] (rows=1019 width=8)
+              Merge Join Operator [MERGEJOIN_29] (rows=2048 width=8)
                 Conds:RS_32._col0=RS_35._col0(Inner)
               <-Map 1 [SIMPLE_EDGE] vectorized, llap
                 SHUFFLE [RS_32]
@@ -192,18 +192,18 @@ Stage-0
     Stage-1
       Reducer 4 vectorized, llap
       File Output Operator [FS_41]
-        Select Operator [SEL_40] (rows=509 width=10)
+        Select Operator [SEL_40] (rows=1024 width=11)
           Output:["_col0","_col1"]
         <-Reducer 3 [SIMPLE_EDGE] vectorized, llap
           SHUFFLE [RS_39]
-            Group By Operator [GBY_38] (rows=509 width=10)
+            Group By Operator [GBY_38] (rows=1024 width=11)
               Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
             <-Reducer 2 [SIMPLE_EDGE] llap
               SHUFFLE [RS_11]
                 PartitionCols:_col0
-                Group By Operator [GBY_10] (rows=509 width=10)
+                Group By Operator [GBY_10] (rows=1024 width=11)
                   Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                  Merge Join Operator [MERGEJOIN_31] (rows=1019 width=2)
+                  Merge Join Operator [MERGEJOIN_31] (rows=2048 width=3)
                     Conds:RS_34._col1=RS_37._col0(Inner),Output:["_col0"]
                   <-Map 1 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_34]
diff --git a/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out b/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
index c9133d3..a2ef96b 100644
--- a/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
+++ b/ql/src/test/results/clientpositive/llap/filter_join_breaktask.q.out
@@ -304,13 +304,13 @@ STAGE PLANS:
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col2
                 Position of Big Table: 1
-                Statistics: Num rows: 15 Data size: 1375 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 25 Data size: 2305 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col2 (type: string)
                   null sort order: a
                   sort order: +
                   Map-reduce partition columns: _col2 (type: string)
-                  Statistics: Num rows: 15 Data size: 1375 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 25 Data size: 2305 Basic stats: COMPLETE Column stats: COMPLETE
                   tag: 0
                   value expressions: _col0 (type: int)
                   auto parallelism: true
@@ -325,18 +325,18 @@ STAGE PLANS:
                   0 _col2 (type: string)
                   1 _col0 (type: string)
                 outputColumnNames: _col0, _col3
-                Position of Big Table: 1
-                Statistics: Num rows: 19 Data size: 1747 Basic stats: COMPLETE Column stats: COMPLETE
+                Position of Big Table: 0
+                Statistics: Num rows: 32 Data size: 2956 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col0 (type: int), _col3 (type: string)
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 19 Data size: 1747 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 32 Data size: 2956 Basic stats: COMPLETE Column stats: COMPLETE
                   File Output Operator
                     compressed: false
                     GlobalTableId: 0
 #### A masked pattern was here ####
                     NumFilesPerFileSink: 1
-                    Statistics: Num rows: 19 Data size: 1747 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 32 Data size: 2956 Basic stats: COMPLETE Column stats: COMPLETE
 #### A masked pattern was here ####
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
diff --git a/ql/src/test/results/clientpositive/llap/groupby_groupingset_bug.q.out b/ql/src/test/results/clientpositive/llap/groupby_groupingset_bug.q.out
index 63d5617..d51d8a7 100644
--- a/ql/src/test/results/clientpositive/llap/groupby_groupingset_bug.q.out
+++ b/ql/src/test/results/clientpositive/llap/groupby_groupingset_bug.q.out
@@ -215,7 +215,8 @@ Plan optimized by CBO.
 Vertex dependency in root stage
 Map 1 <- Reducer 3 (BROADCAST_EDGE)
 Map 4 <- Map 1 (BROADCAST_EDGE), Map 7 (BROADCAST_EDGE)
-Map 7 <- Reducer 9 (BROADCAST_EDGE)
+Map 7 <- Reducer 10 (BROADCAST_EDGE), Reducer 9 (BROADCAST_EDGE)
+Reducer 10 <- Reducer 9 (CUSTOM_SIMPLE_EDGE)
 Reducer 3 <- Map 2 (SIMPLE_EDGE)
 Reducer 5 <- Map 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
@@ -226,38 +227,38 @@ Stage-0
     limit:100
     Stage-1
       Reducer 6 vectorized, llap
-      File Output Operator [FS_143]
-        Limit [LIM_142] (rows=2 width=8)
+      File Output Operator [FS_148]
+        Limit [LIM_147] (rows=1 width=8)
           Number of rows:100
-          Select Operator [SEL_141] (rows=2 width=8)
+          Select Operator [SEL_146] (rows=1 width=8)
             Output:["_col0"]
           <-Reducer 5 [SIMPLE_EDGE] vectorized, llap
-            SHUFFLE [RS_140]
-              Select Operator [SEL_139] (rows=2 width=8)
+            SHUFFLE [RS_145]
+              Select Operator [SEL_144] (rows=1 width=8)
                 Output:["_col0"]
-                Group By Operator [GBY_138] (rows=2 width=12)
+                Group By Operator [GBY_143] (rows=1 width=12)
                   Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
                 <-Map 4 [SIMPLE_EDGE] vectorized, llap
-                  SHUFFLE [RS_137]
+                  SHUFFLE [RS_142]
                     PartitionCols:_col0
-                    Group By Operator [GBY_136] (rows=2 width=12)
+                    Group By Operator [GBY_141] (rows=1 width=12)
                       Output:["_col0","_col1"],aggregations:["count()"],keys:_col8
-                      Map Join Operator [MAPJOIN_135] (rows=5185194 width=4)
-                        Conds:MAPJOIN_134._col6=RS_128._col0(Inner),Output:["_col8"]
+                      Map Join Operator [MAPJOIN_140] (rows=2592597 width=4)
+                        Conds:MAPJOIN_139._col6=RS_133._col0(Inner),Output:["_col8"]
                       <-Map 7 [BROADCAST_EDGE] vectorized, llap
-                        BROADCAST [RS_128]
+                        BROADCAST [RS_133]
                           PartitionCols:_col0
-                          Map Join Operator [MAPJOIN_127] (rows=28 width=8)
-                            Conds:SEL_126._col1=RS_124._col0(Inner),Output:["_col0","_col1"]
+                          Map Join Operator [MAPJOIN_132] (rows=14 width=8)
+                            Conds:SEL_131._col1=RS_124._col0(Inner),Output:["_col0","_col1"]
                           <-Reducer 9 [BROADCAST_EDGE] vectorized, llap
-                            BROADCAST [RS_124]
+                            PARTITION_ONLY_SHUFFLE [RS_124]
                               PartitionCols:_col0
-                              Group By Operator [GBY_123] (rows=2 width=4)
+                              Group By Operator [GBY_123] (rows=1 width=4)
                                 Output:["_col0"],keys:KEY._col0
                               <-Map 8 [SIMPLE_EDGE] vectorized, llap
                                 SHUFFLE [RS_122]
                                   PartitionCols:_col0
-                                  Group By Operator [GBY_121] (rows=2 width=4)
+                                  Group By Operator [GBY_121] (rows=1 width=4)
                                     Output:["_col0"],keys:d_month_seq
                                     Select Operator [SEL_120] (rows=4 width=12)
                                       Output:["d_month_seq"]
@@ -265,20 +266,24 @@ Stage-0
                                         predicate:((d_year = 2000) and ((d_year * d_moy) > 200000) and (d_moy = 2) and d_month_seq is not null)
                                         TableScan [TS_17] (rows=28 width=12)
                                           default@x1_date_dim,x1_date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_month_seq","d_year","d_moy"]
-                          <-Select Operator [SEL_126] (rows=28 width=8)
+                          <-Select Operator [SEL_131] (rows=28 width=8)
                               Output:["_col0","_col1"]
-                              Filter Operator [FIL_125] (rows=28 width=8)
-                                predicate:(d_date_sk is not null and d_month_seq is not null)
+                              Filter Operator [FIL_130] (rows=28 width=8)
+                                predicate:(d_date_sk is not null and d_month_seq is not null and d_month_seq BETWEEN DynamicValue(RS_25_x1_date_dim_d_month_seq_min) AND DynamicValue(RS_25_x1_date_dim_d_month_seq_max) and in_bloom_filter(d_month_seq, DynamicValue(RS_25_x1_date_dim_d_month_seq_bloom_filter)))
                                 TableScan [TS_14] (rows=28 width=8)
                                   default@x1_date_dim,d,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_month_seq"]
-                        Dynamic Partitioning Event Operator [EVENT_131] (rows=1 width=4)
-                          Group By Operator [GBY_130] (rows=1 width=4)
+                                <-Reducer 10 [BROADCAST_EDGE] vectorized, llap
+                                  BROADCAST [RS_129]
+                                    Group By Operator [GBY_128] (rows=1 width=12)
+                                      Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
+                        Dynamic Partitioning Event Operator [EVENT_136] (rows=1 width=4)
+                          Group By Operator [GBY_135] (rows=1 width=4)
                             Output:["_col0"],keys:_col0
-                            Select Operator [SEL_129] (rows=28 width=8)
+                            Select Operator [SEL_134] (rows=14 width=8)
                               Output:["_col0"]
-                               Please refer to the previous Map Join Operator [MAPJOIN_127]
-                      <-Map Join Operator [MAPJOIN_134] (rows=370371 width=4)
-                          Conds:RS_31._col0=SEL_133._col0(Inner),Output:["_col6"]
+                               Please refer to the previous Map Join Operator [MAPJOIN_132]
+                      <-Map Join Operator [MAPJOIN_139] (rows=370371 width=4)
+                          Conds:RS_31._col0=SEL_138._col0(Inner),Output:["_col6"]
                         <-Map 1 [BROADCAST_EDGE] llap
                           BROADCAST [RS_31]
                             PartitionCols:_col0
@@ -308,9 +313,9 @@ Stage-0
                                   predicate:(i_item_sk is not null and i_category is not null and i_current_price is not null)
                                   TableScan [TS_0] (rows=18 width=201)
                                     default@x1_item,i,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_category","i_current_price"]
-                        <-Select Operator [SEL_133] (rows=123457 width=8)
+                        <-Select Operator [SEL_138] (rows=123457 width=8)
                             Output:["_col0","_col1"]
-                            Filter Operator [FIL_132] (rows=123457 width=8)
+                            Filter Operator [FIL_137] (rows=123457 width=8)
                               predicate:ss_item_sk is not null
                               TableScan [TS_11] (rows=123457 width=8)
                                 default@x1_store_sales,s,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_item_sk"]
diff --git a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
index 3f6a786..f39dc2b 100644
--- a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out
@@ -315,7 +315,7 @@ STAGE PLANS:
                           1 _col0 (type: int)
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 13785 Data size: 110280 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 18464 Data size: 147712 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
                           minReductionHashAggr: 0.99
@@ -439,7 +439,7 @@ STAGE PLANS:
                           1 _col0 (type: int)
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 13785 Data size: 110280 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 18464 Data size: 147712 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
                           minReductionHashAggr: 0.99
@@ -559,7 +559,7 @@ STAGE PLANS:
                         1 _col0 (type: int)
                       input vertices:
                         1 Map 3
-                      Statistics: Num rows: 18466 Data size: 147728 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 21560 Data size: 172480 Basic stats: COMPLETE Column stats: COMPLETE
                       Group By Operator
                         aggregations: count()
                         minReductionHashAggr: 0.99
@@ -679,7 +679,7 @@ STAGE PLANS:
                         1 _col0 (type: int)
                       input vertices:
                         1 Map 3
-                      Statistics: Num rows: 18466 Data size: 147728 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 21560 Data size: 172480 Basic stats: COMPLETE Column stats: COMPLETE
                       Group By Operator
                         aggregations: count()
                         minReductionHashAggr: 0.99
diff --git a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_2.q.out b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_2.q.out
index 9eac255..1ddc1ea 100644
--- a/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_2.q.out
@@ -1401,7 +1401,7 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1
                       input vertices:
                         0 Map 1
-                      Statistics: Num rows: 4 Data size: 700 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 12 Data size: 2100 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -1411,7 +1411,7 @@ STAGE PLANS:
                         outputColumnNames: _col1
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 4 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 18 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
                         Map Join Operator
                           condition map:
                                Inner Join 0 to 1
@@ -1421,7 +1421,7 @@ STAGE PLANS:
                           outputColumnNames: _col1
                           input vertices:
                             1 Map 5
-                          Statistics: Num rows: 4 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 114 Data size: 10146 Basic stats: COMPLETE Column stats: COMPLETE
                           Map Join Operator
                             condition map:
                                  Inner Join 0 to 1
@@ -1430,10 +1430,10 @@ STAGE PLANS:
                               1 value (type: string)
                             input vertices:
                               1 Map 6
-                            Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 185 Data size: 1480 Basic stats: COMPLETE Column stats: COMPLETE
                             Group By Operator
                               aggregations: count()
-                              minReductionHashAggr: 0.75
+                              minReductionHashAggr: 0.99
                               mode: hash
                               outputColumnNames: _col0
                               Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1632,7 +1632,7 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1
                       input vertices:
                         0 Map 1
-                      Statistics: Num rows: 4 Data size: 700 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 12 Data size: 2100 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -1642,7 +1642,7 @@ STAGE PLANS:
                         outputColumnNames: _col1
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 4 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 18 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
                         Map Join Operator
                           condition map:
                                Inner Join 0 to 1
@@ -1652,7 +1652,7 @@ STAGE PLANS:
                           outputColumnNames: _col1
                           input vertices:
                             1 Map 5
-                          Statistics: Num rows: 4 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 114 Data size: 10146 Basic stats: COMPLETE Column stats: COMPLETE
                           Map Join Operator
                             condition map:
                                  Inner Join 0 to 1
@@ -1661,10 +1661,10 @@ STAGE PLANS:
                               1 value (type: string)
                             input vertices:
                               1 Map 6
-                            Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 185 Data size: 1480 Basic stats: COMPLETE Column stats: COMPLETE
                             Group By Operator
                               aggregations: count()
-                              minReductionHashAggr: 0.75
+                              minReductionHashAggr: 0.99
                               mode: hash
                               outputColumnNames: _col0
                               Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/join46.q.out b/ql/src/test/results/clientpositive/llap/join46.q.out
index 85fd4c5..485573a 100644
--- a/ql/src/test/results/clientpositive/llap/join46.q.out
+++ b/ql/src/test/results/clientpositive/llap/join46.q.out
@@ -475,10 +475,10 @@ STAGE PLANS:
                   0 _col1 (type: int)
                   1 _col1 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1665,14 +1665,14 @@ STAGE PLANS:
                   1 _col1 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
                 residual filter predicates: {(_col0 BETWEEN 100 AND 102 or _col6)}
-                Statistics: Num rows: 7 Data size: 1265 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 8 Data size: 1560 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                  Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                   File Output Operator
                     compressed: false
-                    Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -2310,14 +2310,14 @@ STAGE PLANS:
                   1 _col1 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
                 residual filter predicates: {(_col4 BETWEEN 100 AND 102 or _col3)}
-                Statistics: Num rows: 7 Data size: 1261 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 8 Data size: 1560 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col4 (type: int), _col5 (type: int), _col6 (type: string), _col0 (type: int), _col1 (type: int), _col2 (type: string)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                  Statistics: Num rows: 7 Data size: 1233 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                   Reduce Output Operator
                     sort order: 
-                    Statistics: Num rows: 7 Data size: 1233 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
         Reducer 3 
             Execution mode: llap
@@ -2330,10 +2330,10 @@ STAGE PLANS:
                   1 
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
                 residual filter predicates: {(_col1 is null or (_col10 is null and (_col7 <> _col4)))}
-                Statistics: Num rows: 63 Data size: 23764 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 72 Data size: 27306 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 63 Data size: 23764 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 72 Data size: 27306 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/mapjoin46.q.out b/ql/src/test/results/clientpositive/llap/mapjoin46.q.out
index 3715be6..1610bf7 100644
--- a/ql/src/test/results/clientpositive/llap/mapjoin46.q.out
+++ b/ql/src/test/results/clientpositive/llap/mapjoin46.q.out
@@ -447,10 +447,10 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                       input vertices:
                         0 Map 1
-                      Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                       File Output Operator
                         compressed: false
-                        Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                         table:
                             input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                             output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1472,14 +1472,14 @@ STAGE PLANS:
                       input vertices:
                         0 Map 1
                       residual filter predicates: {(_col0 BETWEEN 100 AND 102 or _col6)}
-                      Statistics: Num rows: 7 Data size: 1265 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 8 Data size: 1560 Basic stats: COMPLETE Column stats: COMPLETE
                       Select Operator
                         expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                        Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                         File Output Operator
                           compressed: false
-                          Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                           table:
                               input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                               output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -2538,14 +2538,14 @@ STAGE PLANS:
                       input vertices:
                         1 Map 3
                       residual filter predicates: {(_col4 BETWEEN 100 AND 102 or _col3)}
-                      Statistics: Num rows: 7 Data size: 1261 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 8 Data size: 1560 Basic stats: COMPLETE Column stats: COMPLETE
                       Select Operator
                         expressions: _col4 (type: int), _col5 (type: int), _col6 (type: string), _col0 (type: int), _col1 (type: int), _col2 (type: string)
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                        Statistics: Num rows: 7 Data size: 1233 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           sort order: 
-                          Statistics: Num rows: 7 Data size: 1233 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                           value expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
             Execution mode: llap
             LLAP IO: no inputs
@@ -2624,10 +2624,10 @@ STAGE PLANS:
                   1 
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
                 residual filter predicates: {(_col1 is null or (_col10 is null and (_col7 <> _col4)))}
-                Statistics: Num rows: 63 Data size: 23764 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 72 Data size: 27306 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 63 Data size: 23764 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 72 Data size: 27306 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -2784,14 +2784,14 @@ STAGE PLANS:
                       input vertices:
                         1 Map 3
                       residual filter predicates: {(_col4 BETWEEN 100 AND 102 or _col3)}
-                      Statistics: Num rows: 7 Data size: 1261 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 8 Data size: 1560 Basic stats: COMPLETE Column stats: COMPLETE
                       Select Operator
                         expressions: _col4 (type: int), _col5 (type: int), _col6 (type: string), _col0 (type: int), _col1 (type: int), _col2 (type: string)
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                        Statistics: Num rows: 7 Data size: 1233 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           sort order: 
-                          Statistics: Num rows: 7 Data size: 1233 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                           value expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
             Execution mode: llap
             LLAP IO: no inputs
@@ -2870,10 +2870,10 @@ STAGE PLANS:
                   1 
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
                 residual filter predicates: {(_col1 is null or (_col10 is null and (_col7 <> _col4)))}
-                Statistics: Num rows: 63 Data size: 23764 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 72 Data size: 27306 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 63 Data size: 23764 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 72 Data size: 27306 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/orc_llap.q.out b/ql/src/test/results/clientpositive/llap/orc_llap.q.out
index 4f805b0..b9c5b06 100644
--- a/ql/src/test/results/clientpositive/llap/orc_llap.q.out
+++ b/ql/src/test/results/clientpositive/llap/orc_llap.q.out
@@ -640,11 +640,11 @@ STAGE PLANS:
                         outputColumnNames: _col1, _col3
                         input vertices:
                           0 Map 1
-                        Statistics: Num rows: 159130 Data size: 26936864 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 285509 Data size: 50948874 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: hash(_col1,_col3) (type: int)
                           outputColumnNames: _col0
-                          Statistics: Num rows: 159130 Data size: 26936864 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 285509 Data size: 50948874 Basic stats: COMPLETE Column stats: COMPLETE
                           Group By Operator
                             aggregations: sum(_col0)
                             minReductionHashAggr: 0.99
@@ -1124,11 +1124,11 @@ STAGE PLANS:
                         outputColumnNames: _col1, _col3
                         input vertices:
                           0 Map 1
-                        Statistics: Num rows: 636522 Data size: 114343414 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 1142036 Data size: 210391074 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: hash(_col1,_col3) (type: int)
                           outputColumnNames: _col0
-                          Statistics: Num rows: 636522 Data size: 114343414 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 1142036 Data size: 210391074 Basic stats: COMPLETE Column stats: COMPLETE
                           Group By Operator
                             aggregations: sum(_col0)
                             minReductionHashAggr: 0.99
diff --git a/ql/src/test/results/clientpositive/llap/reopt_semijoin.q.out b/ql/src/test/results/clientpositive/llap/reopt_semijoin.q.out
index 5ad0104..527395a 100644
--- a/ql/src/test/results/clientpositive/llap/reopt_semijoin.q.out
+++ b/ql/src/test/results/clientpositive/llap/reopt_semijoin.q.out
@@ -191,7 +191,7 @@ STAGE PLANS:
                         outputColumnNames: _col0
                         Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
-                          aggregations: min(_col0), max(_col0), bloom_filter(_col0, expectedEntries=4)
+                          aggregations: min(_col0), max(_col0), bloom_filter(_col0, expectedEntries=2)
                           minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0, _col1, _col2
@@ -242,7 +242,7 @@ STAGE PLANS:
             Execution mode: vectorized, llap
             Reduce Operator Tree:
               Group By Operator
-                aggregations: min(VALUE._col0), max(VALUE._col1), bloom_filter(VALUE._col2, expectedEntries=4)
+                aggregations: min(VALUE._col0), max(VALUE._col1), bloom_filter(VALUE._col2, expectedEntries=2)
                 mode: final
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/retry_failure_reorder.q.out b/ql/src/test/results/clientpositive/llap/retry_failure_reorder.q.out
index 6c104ce..5c0f1d3 100644
--- a/ql/src/test/results/clientpositive/llap/retry_failure_reorder.q.out
+++ b/ql/src/test/results/clientpositive/llap/retry_failure_reorder.q.out
@@ -144,9 +144,9 @@ Stage-0
             PARTITION_ONLY_SHUFFLE [RS_18]
               Group By Operator [GBY_17] (rows=1 width=8)
                 Output:["_col0"],aggregations:["sum(_col0)"]
-                Select Operator [SEL_15] (rows=80 width=12)
+                Select Operator [SEL_15] (rows=114 width=12)
                   Output:["_col0"]
-                  Merge Join Operator [MERGEJOIN_51] (rows=80 width=12)
+                  Merge Join Operator [MERGEJOIN_51] (rows=114 width=12)
                     Conds:RS_12._col1=RS_60._col0(Inner),Output:["_col2","_col4","_col6"]
                   <-Map 6 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_60]
@@ -276,9 +276,9 @@ Stage-0
             PARTITION_ONLY_SHUFFLE [RS_18]
               Group By Operator [GBY_17] (rows=1 width=8)
                 Output:["_col0"],aggregations:["sum(_col0)"]
-                Select Operator [SEL_15] (rows=62 width=12)
+                Select Operator [SEL_15] (rows=105 width=12)
                   Output:["_col0"]
-                  Merge Join Operator [MERGEJOIN_51] (rows=62 width=12)
+                  Merge Join Operator [MERGEJOIN_51] (rows=105 width=12)
                     Conds:RS_12._col0=RS_60._col0(Inner),Output:["_col2","_col4","_col6"]
                   <-Map 6 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_60]
@@ -292,7 +292,7 @@ Stage-0
                   <-Reducer 2 [SIMPLE_EDGE] llap
                     SHUFFLE [RS_12]
                       PartitionCols:_col0
-                      Merge Join Operator [MERGEJOIN_50] (rows=15 width=12)
+                      Merge Join Operator [MERGEJOIN_50] (rows=21 width=12)
                         Conds:RS_54._col1=RS_57._col0(Inner),Output:["_col0","_col2","_col4"]
                       <-Map 1 [SIMPLE_EDGE] vectorized, llap
                         SHUFFLE [RS_54]
@@ -429,9 +429,9 @@ Stage-0
             PARTITION_ONLY_SHUFFLE [RS_18]
               Group By Operator [GBY_17] (rows=1 width=8)
                 Output:["_col0"],aggregations:["sum(_col0)"]
-                Select Operator [SEL_15] (rows=80 width=12)
+                Select Operator [SEL_15] (rows=114 width=12)
                   Output:["_col0"]
-                  Merge Join Operator [MERGEJOIN_51] (rows=80 width=12)
+                  Merge Join Operator [MERGEJOIN_51] (rows=114 width=12)
                     Conds:RS_12._col1=RS_60._col0(Inner),Output:["_col2","_col4","_col6"]
                   <-Map 6 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_60]
diff --git a/ql/src/test/results/clientpositive/llap/semijoin6.q.out b/ql/src/test/results/clientpositive/llap/semijoin6.q.out
index 18c46a7..4b8fcf7 100644
--- a/ql/src/test/results/clientpositive/llap/semijoin6.q.out
+++ b/ql/src/test/results/clientpositive/llap/semijoin6.q.out
@@ -115,10 +115,10 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -432,14 +432,14 @@ STAGE PLANS:
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col3
                 residual filter predicates: {(_col1 <> _col3)}
-                Statistics: Num rows: 3 Data size: 36 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 4 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col0 (type: int), _col1 (type: int)
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                   File Output Operator
                     compressed: false
-                    Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/semijoin7.q.out b/ql/src/test/results/clientpositive/llap/semijoin7.q.out
index 5c4446f..3ff5faa 100644
--- a/ql/src/test/results/clientpositive/llap/semijoin7.q.out
+++ b/ql/src/test/results/clientpositive/llap/semijoin7.q.out
@@ -111,10 +111,10 @@ STAGE PLANS:
                   0 a (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -420,14 +420,14 @@ STAGE PLANS:
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col6
                 residual filter predicates: {(_col1 <> _col6)}
-                Statistics: Num rows: 3 Data size: 36 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 4 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col0 (type: int), _col1 (type: int)
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 3 Data size: 36 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 4 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                   File Output Operator
                     compressed: false
-                    Statistics: Num rows: 3 Data size: 36 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 4 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/skewjoin.q.out b/ql/src/test/results/clientpositive/llap/skewjoin.q.out
index d2f9456..3baa24f 100644
--- a/ql/src/test/results/clientpositive/llap/skewjoin.q.out
+++ b/ql/src/test/results/clientpositive/llap/skewjoin.q.out
@@ -1091,12 +1091,12 @@ STAGE PLANS:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
                 outputColumnNames: _col0, _col3
-                Statistics: Num rows: 55 Data size: 9790 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 86 Data size: 15308 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col0 (type: string)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: string)
-                  Statistics: Num rows: 55 Data size: 9790 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 86 Data size: 15308 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col3 (type: string)
         Reducer 3 
             Execution mode: llap
@@ -1108,10 +1108,10 @@ STAGE PLANS:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
                 outputColumnNames: _col0, _col3
-                Statistics: Num rows: 55 Data size: 9790 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 135 Data size: 24030 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: sum(hash(_col0)), sum(hash(_col3))
-                  minReductionHashAggr: 0.9818182
+                  minReductionHashAggr: 0.99
                   mode: hash
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/smb_mapjoin_14.q.out b/ql/src/test/results/clientpositive/llap/smb_mapjoin_14.q.out
index 49bda58..1aebec3 100644
--- a/ql/src/test/results/clientpositive/llap/smb_mapjoin_14.q.out
+++ b/ql/src/test/results/clientpositive/llap/smb_mapjoin_14.q.out
@@ -503,10 +503,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -629,10 +629,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -777,10 +777,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -915,10 +915,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1161,10 +1161,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1269,10 +1269,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1389,12 +1389,12 @@ STAGE PLANS:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
                         outputColumnNames: _col0
-                        Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
                           sort order: +
                           Map-reduce partition columns: _col0 (type: int)
-                          Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
         Map 5 
             Map Operator Tree:
@@ -1425,10 +1425,10 @@ STAGE PLANS:
                 keys:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
-                Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 6 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
-                  minReductionHashAggr: 0.6666666
+                  minReductionHashAggr: 0.8333333
                   mode: hash
                   outputColumnNames: _col0
                   Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1558,10 +1558,10 @@ STAGE PLANS:
                         keys:
                           0 _col0 (type: int)
                           1 _col0 (type: int)
-                        Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
-                          minReductionHashAggr: 0.6666666
+                          minReductionHashAggr: 0.75
                           mode: hash
                           outputColumnNames: _col0
                           Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/subquery_exists.q.out b/ql/src/test/results/clientpositive/llap/subquery_exists.q.out
index 0735c0a..e3b3f73 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_exists.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_exists.q.out
@@ -88,10 +88,10 @@ STAGE PLANS:
                   0 _col0 (type: string), _col1 (type: string)
                   1 _col0 (type: string), _col1 (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/subquery_in.q.out b/ql/src/test/results/clientpositive/llap/subquery_in.q.out
index 98bb91f..c888a87 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_in.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_in.q.out
@@ -81,10 +81,10 @@ STAGE PLANS:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -209,10 +209,10 @@ STAGE PLANS:
                   0 _col0 (type: string), _col1 (type: string)
                   1 _col0 (type: string), _col1 (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -723,10 +723,10 @@ STAGE PLANS:
                   0 _col0 (type: string), _col1 (type: string)
                   1 _col0 (type: string), _col1 (type: string)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1151,15 +1151,15 @@ STAGE PLANS:
                       Statistics: Num rows: 14 Data size: 56 Basic stats: COMPLETE Column stats: COMPLETE
                       Group By Operator
                         keys: _col0 (type: int)
-                        minReductionHashAggr: 0.5
+                        minReductionHashAggr: 0.71428573
                         mode: hash
                         outputColumnNames: _col0
-                        Statistics: Num rows: 7 Data size: 28 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
                           sort order: +
                           Map-reduce partition columns: _col0 (type: int)
-                          Statistics: Num rows: 7 Data size: 28 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
         Reducer 2 
@@ -1189,14 +1189,14 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col1, _col2
-                Statistics: Num rows: 7 Data size: 56 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 14 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col1 (type: int), _col2 (type: int)
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 7 Data size: 56 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 14 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                   File Output Operator
                     compressed: false
-                    Statistics: Num rows: 7 Data size: 56 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 14 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -3637,7 +3637,7 @@ STAGE PLANS:
                       Statistics: Num rows: 8 Data size: 1752 Basic stats: COMPLETE Column stats: COMPLETE
                       Group By Operator
                         keys: _col0 (type: string), _col1 (type: string)
-                        minReductionHashAggr: 0.0
+                        minReductionHashAggr: 0.375
                         mode: hash
                         outputColumnNames: _col0, _col1
                         Statistics: Num rows: 4 Data size: 876 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/subquery_in_having.q.out b/ql/src/test/results/clientpositive/llap/subquery_in_having.q.out
index 9e75c75..3d96385 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_in_having.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_in_having.q.out
@@ -653,19 +653,19 @@ STAGE PLANS:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
                 outputColumnNames: _col1, _col2
-                Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
                   keys: _col1 (type: string), _col2 (type: string)
                   minReductionHashAggr: 0.0
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
-                  Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                   Reduce Output Operator
                     key expressions: _col0 (type: string), _col1 (type: string)
                     sort order: ++
                     Map-reduce partition columns: _col0 (type: string), _col1 (type: string)
-                    Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col2 (type: bigint)
         Reducer 4 
             Execution mode: vectorized, llap
@@ -675,15 +675,15 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string), KEY._col1 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                 Filter Operator
                   predicate: _col2 is not null (type: boolean)
-                  Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                   Reduce Output Operator
                     key expressions: _col2 (type: bigint)
                     sort order: +
                     Map-reduce partition columns: _col2 (type: bigint)
-                    Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col0 (type: string), _col1 (type: string)
         Reducer 5 
             Execution mode: llap
@@ -864,19 +864,19 @@ STAGE PLANS:
                         outputColumnNames: _col1, _col2
                         input vertices:
                           0 Reducer 2
-                        Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
                           keys: _col1 (type: string), _col2 (type: string)
                           minReductionHashAggr: 0.0
                           mode: hash
                           outputColumnNames: _col0, _col1, _col2
-                          Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                           Reduce Output Operator
                             key expressions: _col0 (type: string), _col1 (type: string)
                             sort order: ++
                             Map-reduce partition columns: _col0 (type: string), _col1 (type: string)
-                            Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                             value expressions: _col2 (type: bigint)
             Execution mode: vectorized, llap
             LLAP IO: no inputs
@@ -932,10 +932,10 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string), KEY._col1 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                 Filter Operator
                   predicate: _col2 is not null (type: boolean)
-                  Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                   Map Join Operator
                     condition map:
                          Left Semi Join 0 to 1
diff --git a/ql/src/test/results/clientpositive/llap/subquery_multi.q.out b/ql/src/test/results/clientpositive/llap/subquery_multi.q.out
index c964baa..190c79e 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_multi.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_multi.q.out
@@ -3203,14 +3203,14 @@ STAGE PLANS:
                   0 _col1 (type: int), _col4 (type: int)
                   1 _col0 (type: int), _col1 (type: int)
                 outputColumnNames: _col0, _col3
-                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col0 (type: int), _col3 (type: int)
                   outputColumnNames: _col0, _col1
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
                   File Output Operator
                     compressed: false
-                    Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/subquery_scalar.q.out b/ql/src/test/results/clientpositive/llap/subquery_scalar.q.out
index cddbe79..f9cb495 100644
--- a/ql/src/test/results/clientpositive/llap/subquery_scalar.q.out
+++ b/ql/src/test/results/clientpositive/llap/subquery_scalar.q.out
@@ -5673,19 +5673,19 @@ STAGE PLANS:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
                 outputColumnNames: _col1, _col2
-                Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: count()
                   keys: _col1 (type: string), _col2 (type: string)
                   minReductionHashAggr: 0.0
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
-                  Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                   Reduce Output Operator
                     key expressions: _col0 (type: string), _col1 (type: string)
                     sort order: ++
                     Map-reduce partition columns: _col0 (type: string), _col1 (type: string)
-                    Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col2 (type: bigint)
         Reducer 4 
             Execution mode: vectorized, llap
@@ -5695,13 +5695,13 @@ STAGE PLANS:
                 keys: KEY._col0 (type: string), KEY._col1 (type: string)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                 Filter Operator
                   predicate: _col2 is not null (type: boolean)
-                  Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                   Reduce Output Operator
                     sort order: 
-                    Statistics: Num rows: 41 Data size: 7626 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 65 Data size: 12090 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col0 (type: string), _col1 (type: string), _col2 (type: bigint)
         Reducer 5 
             Execution mode: llap
@@ -5714,14 +5714,14 @@ STAGE PLANS:
                   1 
                 outputColumnNames: _col0, _col1, _col2, _col3
                 residual filter predicates: {(_col2 > _col3)}
-                Statistics: Num rows: 13 Data size: 2522 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 21 Data size: 4074 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col0 (type: string), _col1 (type: string), _col2 (type: bigint)
                   outputColumnNames: _col0, _col1, _col2
-                  Statistics: Num rows: 13 Data size: 2418 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 21 Data size: 3906 Basic stats: COMPLETE Column stats: COMPLETE
                   File Output Operator
                     compressed: false
-                    Statistics: Num rows: 13 Data size: 2418 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 21 Data size: 3906 Basic stats: COMPLETE Column stats: COMPLETE
                     table:
                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
index f959d71..d83b7c9 100644
--- a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
@@ -359,7 +359,7 @@ STAGE PLANS:
                 Group By Operator
                   aggregations: count()
                   keys: _col0 (type: smallint)
-                  minReductionHashAggr: 0.49950933
+                  minReductionHashAggr: 0.49951172
                   mode: hash
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: ###Masked### Data size: ###Masked### Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_2.q.out b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_2.q.out
index 87c47cd..483609f 100644
--- a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_2.q.out
@@ -102,12 +102,12 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
-                Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col12 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col12 (type: int)
-                  Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: int), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 3 
             Execution mode: llap
@@ -119,11 +119,11 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col1 (type: smallint), _col0 (type: tinyint), _col2 (type: int)
                   sort order: +++
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 4 
             Execution mode: vectorized, llap
@@ -131,10 +131,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey2 (type: int), VALUE._col0 (type: bigint), VALUE._col1 (type: float), VALUE._col2 (type: double), VALUE._col3 (type: string), VALUE._col4 (type: string), VALUE._col5 (type: timestamp), VALUE._col6 (type: timestamp), VALUE._col7 (type: boolean), VALUE._col8 (type: boolean)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -307,12 +307,12 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
-                Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col12 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col12 (type: int)
-                  Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: int), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 3 
             Execution mode: llap
@@ -324,11 +324,11 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col1 (type: smallint), _col0 (type: tinyint), _col2 (type: int)
                   sort order: +++
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 4 
             Execution mode: vectorized, llap
@@ -336,10 +336,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey2 (type: int), VALUE._col0 (type: bigint), VALUE._col1 (type: float), VALUE._col2 (type: double), VALUE._col3 (type: string), VALUE._col4 (type: string), VALUE._col5 (type: timestamp), VALUE._col6 (type: timestamp), VALUE._col7 (type: boolean), VALUE._col8 (type: boolean)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -512,12 +512,12 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
-                Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col12 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col12 (type: int)
-                  Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: int), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 3 
             Execution mode: llap
@@ -529,11 +529,11 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col1 (type: smallint), _col0 (type: tinyint), _col2 (type: int)
                   sort order: +++
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 4 
             Execution mode: vectorized, llap
@@ -541,10 +541,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey2 (type: int), VALUE._col0 (type: bigint), VALUE._col1 (type: float), VALUE._col2 (type: double), VALUE._col3 (type: string), VALUE._col4 (type: string), VALUE._col5 (type: timestamp), VALUE._col6 (type: timestamp), VALUE._col7 (type: boolean), VALUE._col8 (type: boolean)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
index 17f6467..a7bd2b6 100644
--- a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
@@ -359,7 +359,7 @@ STAGE PLANS:
                 Group By Operator
                   aggregations: count()
                   keys: _col0 (type: smallint)
-                  minReductionHashAggr: 0.49950933
+                  minReductionHashAggr: 0.49951172
                   mode: hash
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: ###Masked### Data size: ###Masked### Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_2.q.out b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_2.q.out
index 87c47cd..483609f 100644
--- a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_2.q.out
@@ -102,12 +102,12 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
-                Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col12 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col12 (type: int)
-                  Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: int), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 3 
             Execution mode: llap
@@ -119,11 +119,11 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col1 (type: smallint), _col0 (type: tinyint), _col2 (type: int)
                   sort order: +++
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 4 
             Execution mode: vectorized, llap
@@ -131,10 +131,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey2 (type: int), VALUE._col0 (type: bigint), VALUE._col1 (type: float), VALUE._col2 (type: double), VALUE._col3 (type: string), VALUE._col4 (type: string), VALUE._col5 (type: timestamp), VALUE._col6 (type: timestamp), VALUE._col7 (type: boolean), VALUE._col8 (type: boolean)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -307,12 +307,12 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
-                Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col12 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col12 (type: int)
-                  Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: int), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 3 
             Execution mode: llap
@@ -324,11 +324,11 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col1 (type: smallint), _col0 (type: tinyint), _col2 (type: int)
                   sort order: +++
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 4 
             Execution mode: vectorized, llap
@@ -336,10 +336,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey2 (type: int), VALUE._col0 (type: bigint), VALUE._col1 (type: float), VALUE._col2 (type: double), VALUE._col3 (type: string), VALUE._col4 (type: string), VALUE._col5 (type: timestamp), VALUE._col6 (type: timestamp), VALUE._col7 (type: boolean), VALUE._col8 (type: boolean)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -512,12 +512,12 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
-                Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col12 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col12 (type: int)
-                  Statistics: Num rows: 500 Data size: 40234 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1083 Data size: 158946 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: int), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 3 
             Execution mode: llap
@@ -529,11 +529,11 @@ STAGE PLANS:
                   0 _col12 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col1 (type: smallint), _col0 (type: tinyint), _col2 (type: int)
                   sort order: +++
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col3 (type: bigint), _col4 (type: float), _col5 (type: double), _col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 (type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
         Reducer 4 
             Execution mode: vectorized, llap
@@ -541,10 +541,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey2 (type: int), VALUE._col0 (type: bigint), VALUE._col1 (type: float), VALUE._col2 (type: double), VALUE._col3 (type: string), VALUE._col4 (type: string), VALUE._col5 (type: timestamp), VALUE._col6 (type: timestamp), VALUE._col7 (type: boolean), VALUE._col8 (type: boolean)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
-                Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 791 Data size: 130440 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1713 Data size: 353010 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/vector_interval_mapjoin.q.out b/ql/src/test/results/clientpositive/llap/vector_interval_mapjoin.q.out
index a75fc35..479d139 100644
--- a/ql/src/test/results/clientpositive/llap/vector_interval_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_interval_mapjoin.q.out
@@ -240,7 +240,7 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1, _col2
                         input vertices:
                           1 Map 2
-                        Statistics: Num rows: 33319 Data size: 6663800 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 34600 Data size: 6920000 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: _col0 (type: string), _col2 (type: string), _col1 (type: interval_day_time)
                           outputColumnNames: _col0, _col1, _col2
@@ -248,13 +248,13 @@ STAGE PLANS:
                               className: VectorSelectOperator
                               native: true
                               projectedOutputColumnNums: [8, 8, 16]
-                          Statistics: Num rows: 33319 Data size: 6663800 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 34600 Data size: 6920000 Basic stats: COMPLETE Column stats: COMPLETE
                           File Output Operator
                             compressed: false
                             File Sink Vectorization:
                                 className: VectorFileSinkOperator
                                 native: false
-                            Statistics: Num rows: 33319 Data size: 6663800 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 34600 Data size: 6920000 Basic stats: COMPLETE Column stats: COMPLETE
                             table:
                                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/vector_left_outer_join.q.out b/ql/src/test/results/clientpositive/llap/vector_left_outer_join.q.out
index b667632..190647e 100644
--- a/ql/src/test/results/clientpositive/llap/vector_left_outer_join.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_left_outer_join.q.out
@@ -55,7 +55,7 @@ STAGE PLANS:
                       outputColumnNames: _col0
                       input vertices:
                         1 Map 3
-                      Statistics: Num rows: 18466 Data size: 61408 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 21560 Data size: 73784 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Left Outer Join 0 to 1
@@ -64,7 +64,7 @@ STAGE PLANS:
                           1 _col0 (type: tinyint)
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 1302989 Data size: 10423912 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 1528346 Data size: 12226768 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
                           minReductionHashAggr: 0.99
diff --git a/ql/src/test/results/clientpositive/llap/vector_mapjoin_reduce.q.out b/ql/src/test/results/clientpositive/llap/vector_mapjoin_reduce.q.out
index 4eef3d5..eca66c0 100644
--- a/ql/src/test/results/clientpositive/llap/vector_mapjoin_reduce.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_mapjoin_reduce.q.out
@@ -154,10 +154,10 @@ STAGE PLANS:
                             vectorProcessingMode: HASH
                             projectedOutputColumnNums: []
                         keys: _col0 (type: int)
-                        minReductionHashAggr: 0.5
+                        minReductionHashAggr: 0.71428573
                         mode: hash
                         outputColumnNames: _col0
-                        Statistics: Num rows: 7 Data size: 28 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: int)
                           sort order: +
@@ -166,7 +166,7 @@ STAGE PLANS:
                               className: VectorReduceSinkLongOperator
                               native: true
                               nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
-                          Statistics: Num rows: 7 Data size: 28 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
             Execution mode: vectorized, llap
             LLAP IO: no inputs
             Map Vectorization:
@@ -228,7 +228,7 @@ STAGE PLANS:
                     outputColumnNames: _col1, _col2
                     input vertices:
                       1 Map 4
-                    Statistics: Num rows: 7 Data size: 56 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 14 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: _col1 (type: int), _col2 (type: int)
                       outputColumnNames: _col0, _col1
@@ -236,13 +236,13 @@ STAGE PLANS:
                           className: VectorSelectOperator
                           native: true
                           projectedOutputColumnNums: [0, 2]
-                      Statistics: Num rows: 7 Data size: 56 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 14 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                       File Output Operator
                         compressed: false
                         File Sink Vectorization:
                             className: VectorFileSinkOperator
                             native: false
-                        Statistics: Num rows: 7 Data size: 56 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 14 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                         table:
                             input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                             output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -372,7 +372,7 @@ STAGE PLANS:
                             outputColumnNames: _col0, _col3
                             input vertices:
                               1 Map 3
-                            Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
                             Select Operator
                               expressions: _col0 (type: int), _col3 (type: int)
                               outputColumnNames: _col0, _col1
@@ -380,13 +380,13 @@ STAGE PLANS:
                                   className: VectorSelectOperator
                                   native: true
                                   projectedOutputColumnNums: [1, 2]
-                              Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                              Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
                               File Output Operator
                                 compressed: false
                                 File Sink Vectorization:
                                     className: VectorFileSinkOperator
                                     native: false
-                                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                                Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE
                                 table:
                                     input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                                     output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/vector_nullsafe_join.q.out b/ql/src/test/results/clientpositive/llap/vector_nullsafe_join.q.out
index 4b8c4b8..7103755 100644
--- a/ql/src/test/results/clientpositive/llap/vector_nullsafe_join.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_nullsafe_join.q.out
@@ -214,7 +214,7 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col5, _col6
                       input vertices:
                         1 Map 2
-                      Statistics: Num rows: 3 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 4 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -231,7 +231,7 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: _col0 (type: int), _col1 (type: int), _col5 (type: int), _col6 (type: int), _col10 (type: int), _col11 (type: int)
                           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
@@ -239,13 +239,13 @@ STAGE PLANS:
                               className: VectorSelectOperator
                               native: true
                               projectedOutputColumnNums: [0, 1, 2, 3, 4, 5]
-                          Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE
                           File Output Operator
                             compressed: false
                             File Sink Vectorization:
                                 className: VectorFileSinkOperator
                                 native: false
-                            Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE
                             table:
                                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1312,7 +1312,7 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col5, _col6
                       input vertices:
                         1 Map 2
-                      Statistics: Num rows: 3 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 4 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -1327,7 +1327,7 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1, _col5, _col6, _col10, _col11
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: _col0 (type: int), _col1 (type: int), _col5 (type: int), _col6 (type: int), _col10 (type: int), _col11 (type: int)
                           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
@@ -1335,13 +1335,13 @@ STAGE PLANS:
                               className: VectorSelectOperator
                               native: true
                               projectedOutputColumnNums: [0, 1, 2, 3, 0, 4]
-                          Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE
                           File Output Operator
                             compressed: false
                             File Sink Vectorization:
                                 className: VectorFileSinkOperator
                                 native: false
-                            Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE
                             table:
                                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/vector_outer_join0.q.out b/ql/src/test/results/clientpositive/llap/vector_outer_join0.q.out
index 8395b7d..6899a90 100644
--- a/ql/src/test/results/clientpositive/llap/vector_outer_join0.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_outer_join0.q.out
@@ -126,13 +126,13 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col2, _col3
                       input vertices:
                         1 Map 2
-                      Statistics: Num rows: 9 Data size: 1480 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 8 Data size: 1484 Basic stats: COMPLETE Column stats: COMPLETE
                       File Output Operator
                         compressed: false
                         File Sink Vectorization:
                             className: VectorFileSinkOperator
                             native: false
-                        Statistics: Num rows: 9 Data size: 1480 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 8 Data size: 1484 Basic stats: COMPLETE Column stats: COMPLETE
                         table:
                             input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                             output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -347,13 +347,13 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col2, _col3
                       input vertices:
                         0 Map 1
-                      Statistics: Num rows: 9 Data size: 1484 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 12 Data size: 1763 Basic stats: COMPLETE Column stats: COMPLETE
                       File Output Operator
                         compressed: false
                         File Sink Vectorization:
                             className: VectorFileSinkOperator
                             native: false
-                        Statistics: Num rows: 9 Data size: 1484 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 12 Data size: 1763 Basic stats: COMPLETE Column stats: COMPLETE
                         table:
                             input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                             output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/vector_outer_join1.q.out b/ql/src/test/results/clientpositive/llap/vector_outer_join1.q.out
index 9c35295..97814ad 100644
--- a/ql/src/test/results/clientpositive/llap/vector_outer_join1.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_outer_join1.q.out
@@ -284,13 +284,13 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23
                       input vertices:
                         1 Map 2
-                      Statistics: Num rows: 18 Data size: 9762 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 33 Data size: 14459 Basic stats: COMPLETE Column stats: COMPLETE
                       File Output Operator
                         compressed: false
                         File Sink Vectorization:
                             className: VectorFileSinkOperator
                             native: false
-                        Statistics: Num rows: 18 Data size: 9762 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 33 Data size: 14459 Basic stats: COMPLETE Column stats: COMPLETE
                         table:
                             input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                             output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -749,7 +749,7 @@ STAGE PLANS:
                       outputColumnNames: _col0
                       input vertices:
                         1 Map 3
-                      Statistics: Num rows: 18 Data size: 56 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 22 Data size: 72 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Left Outer Join 0 to 1
@@ -768,7 +768,7 @@ STAGE PLANS:
                         outputColumnNames: _col0
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 180 Data size: 704 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 220 Data size: 864 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count(), sum(_col0)
                           Group By Vectorization:
diff --git a/ql/src/test/results/clientpositive/llap/vector_outer_join2.q.out b/ql/src/test/results/clientpositive/llap/vector_outer_join2.q.out
index cf9af78..996816f 100644
--- a/ql/src/test/results/clientpositive/llap/vector_outer_join2.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_outer_join2.q.out
@@ -299,7 +299,7 @@ STAGE PLANS:
                       outputColumnNames: _col1
                       input vertices:
                         1 Map 3
-                      Statistics: Num rows: 25 Data size: 128 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 45 Data size: 288 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Left Outer Join 0 to 1
@@ -318,7 +318,7 @@ STAGE PLANS:
                         outputColumnNames: _col1
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 25 Data size: 128 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 90 Data size: 648 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count(), sum(_col1)
                           Group By Vectorization:
@@ -328,7 +328,7 @@ STAGE PLANS:
                               native: false
                               vectorProcessingMode: HASH
                               projectedOutputColumnNums: [0, 1]
-                          minReductionHashAggr: 0.96
+                          minReductionHashAggr: 0.98888886
                           mode: hash
                           outputColumnNames: _col0, _col1
                           Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/vector_windowing_gby.q.out b/ql/src/test/results/clientpositive/llap/vector_windowing_gby.q.out
index 6d0eb35..5fad931 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_gby.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_gby.q.out
@@ -151,11 +151,11 @@ STAGE PLANS:
                   0 _col0 (type: string)
                   1 _col1 (type: string)
                 outputColumnNames: _col1, _col2, _col3
-                Statistics: Num rows: 27 Data size: 212 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 36 Data size: 284 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: sum(_col3), sum(_col1)
                   keys: _col2 (type: boolean)
-                  minReductionHashAggr: 0.9259259
+                  minReductionHashAggr: 0.9444444
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
                   Statistics: Num rows: 3 Data size: 60 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/vector_windowing_gby2.q.out b/ql/src/test/results/clientpositive/llap/vector_windowing_gby2.q.out
index 5930127..769e8ab 100644
--- a/ql/src/test/results/clientpositive/llap/vector_windowing_gby2.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_windowing_gby2.q.out
@@ -1005,11 +1005,11 @@ STAGE PLANS:
                   0 _col0 (type: string)
                   1 _col1 (type: string)
                 outputColumnNames: _col1, _col2, _col3
-                Statistics: Num rows: 27 Data size: 212 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 36 Data size: 284 Basic stats: COMPLETE Column stats: COMPLETE
                 Group By Operator
                   aggregations: sum(_col3), sum(_col1)
                   keys: _col2 (type: boolean)
-                  minReductionHashAggr: 0.9259259
+                  minReductionHashAggr: 0.9444444
                   mode: hash
                   outputColumnNames: _col0, _col1, _col2
                   Statistics: Num rows: 3 Data size: 60 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out b/ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out
index 263b3d8..2eadb1f 100644
--- a/ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out
@@ -2537,10 +2537,10 @@ STAGE PLANS:
                             vectorProcessingMode: HASH
                             projectedOutputColumnNums: [0, 1, 2, 3, 4]
                         keys: _col0 (type: double)
-                        minReductionHashAggr: 0.49980026
+                        minReductionHashAggr: 0.5497403
                         mode: hash
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                        Statistics: Num rows: 1251 Data size: 57520 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 1127 Data size: 51824 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: double)
                           sort order: +
@@ -2549,7 +2549,7 @@ STAGE PLANS:
                               className: VectorReduceSinkMultiKeyOperator
                               native: true
                               nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
-                          Statistics: Num rows: 1251 Data size: 57520 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 1127 Data size: 51824 Basic stats: COMPLETE Column stats: COMPLETE
                           value expressions: _col1 (type: double), _col2 (type: double), _col3 (type: bigint), _col4 (type: bigint), _col5 (type: double)
             Execution mode: vectorized, llap
             LLAP IO: all inputs
@@ -2584,7 +2584,7 @@ STAGE PLANS:
                 keys: KEY._col0 (type: double)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                Statistics: Num rows: 1251 Data size: 57520 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1127 Data size: 51824 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col0 (type: double), ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END) (type: double), (2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), (- ((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END)) (type: double), _col4 (type: bigint), ((2563.58D * ((_col1 - ((_col2 * _col2) / _col3)) /  [...]
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14
@@ -2593,7 +2593,7 @@ STAGE PLANS:
                       native: true
                       projectedOutputColumnNums: [0, 12, 20, 28, 4, 37, 55, 5, 59, 68, 73, 81, 82, 2, 84]
                       selectExpressions: DoubleColDivideLongColumn(col 8:double, col 11:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 7:double)(children: DoubleColDivideLongColumn(col 6:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 6:double) -> 7:double) -> 8:double, IfExprNullCondExpr(col 9:boolean, null, col 10:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 9:boolean, LongColSubtractLongScalar(col 3:bi [...]
-                  Statistics: Num rows: 1251 Data size: 157600 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1127 Data size: 141984 Basic stats: COMPLETE Column stats: COMPLETE
                   Reduce Output Operator
                     key expressions: _col0 (type: double)
                     sort order: +
@@ -2601,7 +2601,7 @@ STAGE PLANS:
                         className: VectorReduceSinkObjectHashOperator
                         native: true
                         nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
-                    Statistics: Num rows: 1251 Data size: 157600 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 1127 Data size: 141984 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col1 (type: double), _col2 (type: double), _col3 (type: double), _col4 (type: bigint), _col5 (type: double), _col6 (type: double), _col7 (type: double), _col8 (type: double), _col9 (type: double), _col10 (type: double), _col11 (type: double), _col12 (type: double), _col13 (type: double), _col14 (type: double)
         Reducer 3 
             Execution mode: vectorized, llap
@@ -2619,13 +2619,13 @@ STAGE PLANS:
                     className: VectorSelectOperator
                     native: true
                     projectedOutputColumnNums: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13]
-                Statistics: Num rows: 1251 Data size: 157600 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 1127 Data size: 141984 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
                   File Sink Vectorization:
                       className: VectorFileSinkOperator
                       native: false
-                  Statistics: Num rows: 1251 Data size: 157600 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 1127 Data size: 141984 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -3275,7 +3275,7 @@ STAGE PLANS:
                         minReductionHashAggr: 0.99
                         mode: hash
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18
-                        Statistics: Num rows: 3 Data size: 432 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: COMPLETE
                         Reduce Output Operator
                           key expressions: _col0 (type: boolean)
                           sort order: +
@@ -3284,7 +3284,7 @@ STAGE PLANS:
                               className: VectorReduceSinkLongOperator
                               native: true
                               nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
-                          Statistics: Num rows: 3 Data size: 432 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: COMPLETE
                           value expressions: _col1 (type: float), _col2 (type: bigint), _col3 (type: double), _col4 (type: double), _col5 (type: bigint), _col6 (type: double), _col7 (type: bigint), _col8 (type: bigint), _col9 (type: double), _col10 (type: double), _col11 (type: bigint), _col12 (type: bigint), _col13 (type: double), _col14 (type: double), _col15 (type: bigint), _col16 (type: double), _col17 (type: double), _col18 (type: bigint)
             Execution mode: vectorized, llap
             LLAP IO: all inputs
@@ -3319,7 +3319,7 @@ STAGE PLANS:
                 keys: KEY._col0 (type: boolean)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18
-                Statistics: Num rows: 3 Data size: 432 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col0 (type: boolean), _col1 (type: float), (- _col1) (type: float), (-26.28D / UDFToDouble(_col1)) (type: double), _col2 (type: bigint), (CAST( _col2 AS decimal(19,0)) - 10.175) (type: decimal(23,3)), ((_col3 - ((_col4 * _col4) / _col5)) / CASE WHEN ((_col5 = 1L)) THEN (null) ELSE ((_col5 - 1)) END) (type: double), (((_col3 - ((_col4 * _col4) / _col5)) / CASE WHEN ((_col5 = 1L)) THEN (null) ELSE ((_col5 - 1)) END) % UDFToDouble(_col1)) (type: double), (10. [...]
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25
@@ -3328,7 +3328,7 @@ STAGE PLANS:
                       native: true
                       projectedOutputColumnNums: [0, 1, 19, 20, 2, 22, 29, 37, 39, 40, 51, 8, 55, 58, 63, 76, 12, 84, 86, 90, 95, 100, 102, 105, 109]
                       selectExpressions: DoubleColUnaryMinus(col 1:float) -> 19:float, DoubleScalarDivideDoubleColumn(val -26.28, col 1:double)(children: col 1:float) -> 20:double, DecimalColSubtractDecimalScalar(col 21:decimal(19,0), val 10.175)(children: CastLongToDecimal(col 2:bigint) -> 21:decimal(19,0)) -> 22:decimal(23,3), DoubleColDivideLongColumn(col 25:double, col 28:bigint)(children: DoubleColSubtractDoubleColumn(col 3:double, col 24:double)(children: DoubleColDivideLongColumn( [...]
-                  Statistics: Num rows: 3 Data size: 1800 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 2 Data size: 1200 Basic stats: COMPLETE Column stats: COMPLETE
                   Reduce Output Operator
                     key expressions: _col0 (type: boolean)
                     sort order: +
@@ -3336,7 +3336,7 @@ STAGE PLANS:
                         className: VectorReduceSinkObjectHashOperator
                         native: true
                         nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
-                    Statistics: Num rows: 3 Data size: 1800 Basic stats: COMPLETE Column stats: COMPLETE
+                    Statistics: Num rows: 2 Data size: 1200 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: _col1 (type: float), _col2 (type: float), _col3 (type: double), _col4 (type: bigint), _col5 (type: decimal(23,3)), _col6 (type: double), _col7 (type: double), _col8 (type: float), _col9 (type: double), _col10 (type: double), _col11 (type: bigint), _col12 (type: double), _col13 (type: float), _col14 (type: double), _col15 (type: double), _col17 (type: bigint), _col18 (type: double), _col19 (type: decimal(24,3)), _col20 (type: decimal(25,3)), _col21 ( [...]
         Reducer 3 
             Execution mode: vectorized, llap
@@ -3354,13 +3354,13 @@ STAGE PLANS:
                     className: VectorSelectOperator
                     native: true
                     projectedOutputColumnNums: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24]
-                Statistics: Num rows: 3 Data size: 1800 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 2 Data size: 1200 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
                   File Sink Vectorization:
                       className: VectorFileSinkOperator
                       native: false
-                  Statistics: Num rows: 3 Data size: 1800 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 2 Data size: 1200 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_join46.q.out b/ql/src/test/results/clientpositive/llap/vectorized_join46.q.out
index 83be1e9..e72c5de 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_join46.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_join46.q.out
@@ -637,13 +637,13 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                       input vertices:
                         0 Map 1
-                      Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                       File Output Operator
                         compressed: false
                         File Sink Vectorization:
                             className: VectorFileSinkOperator
                             native: false
-                        Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                         table:
                             input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                             output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1964,14 +1964,14 @@ STAGE PLANS:
                       input vertices:
                         0 Map 1
                       residual filter predicates: {(_col0 BETWEEN 100 AND 102 or _col6)}
-                      Statistics: Num rows: 7 Data size: 1265 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 8 Data size: 1560 Basic stats: COMPLETE Column stats: COMPLETE
                       Select Operator
                         expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string)
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-                        Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                         File Output Operator
                           compressed: false
-                          Statistics: Num rows: 7 Data size: 1237 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 8 Data size: 1528 Basic stats: COMPLETE Column stats: COMPLETE
                           table:
                               input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                               output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_mapjoin.q.out b/ql/src/test/results/clientpositive/llap/vectorized_mapjoin.q.out
index 90cc453..2f95f26 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_mapjoin.q.out
@@ -64,7 +64,7 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 13785 Data size: 91688 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 18464 Data size: 129120 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: _col0 (type: int), _col1 (type: int), (_col0 + _col1) (type: int)
                           outputColumnNames: _col0, _col1, _col2
@@ -73,7 +73,7 @@ STAGE PLANS:
                               native: true
                               projectedOutputColumnNums: [2, 2, 13]
                               selectExpressions: LongColAddLongColumn(col 2:int, col 2:int) -> 13:int
-                          Statistics: Num rows: 13785 Data size: 91688 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 18464 Data size: 129120 Basic stats: COMPLETE Column stats: COMPLETE
                           Group By Operator
                             aggregations: count(_col0), max(_col1), min(_col0), sum(_col2), count(_col2)
                             Group By Vectorization:
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_nested_mapjoin.q.out b/ql/src/test/results/clientpositive/llap/vectorized_nested_mapjoin.q.out
index 6f8e993..8d2ac81 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_nested_mapjoin.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_nested_mapjoin.q.out
@@ -45,7 +45,7 @@ STAGE PLANS:
                         outputColumnNames: _col1, _col3
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 11087 Data size: 112232 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 14848 Data size: 157364 Basic stats: COMPLETE Column stats: COMPLETE
                         Map Join Operator
                           condition map:
                                Inner Join 0 to 1
@@ -55,7 +55,7 @@ STAGE PLANS:
                           outputColumnNames: _col3
                           input vertices:
                             1 Map 4
-                          Statistics: Num rows: 782315 Data size: 6244648 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 1389803 Data size: 11104552 Basic stats: COMPLETE Column stats: COMPLETE
                           Group By Operator
                             aggregations: sum(_col3)
                             minReductionHashAggr: 0.99
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_shufflejoin.q.out b/ql/src/test/results/clientpositive/llap/vectorized_shufflejoin.q.out
index 1804cae..d217764 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_shufflejoin.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_shufflejoin.q.out
@@ -123,11 +123,11 @@ STAGE PLANS:
                   0 _col0 (type: int)
                   1 _col0 (type: int)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 13785 Data size: 91688 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 18464 Data size: 129120 Basic stats: COMPLETE Column stats: COMPLETE
                 Select Operator
                   expressions: _col0 (type: int), _col1 (type: int), (_col0 + _col1) (type: int)
                   outputColumnNames: _col0, _col1, _col2
-                  Statistics: Num rows: 13785 Data size: 91688 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 18464 Data size: 129120 Basic stats: COMPLETE Column stats: COMPLETE
                   Group By Operator
                     aggregations: count(_col0), max(_col1), min(_col0), sum(_col2), count(_col2)
                     minReductionHashAggr: 0.99
diff --git a/ql/src/test/results/clientpositive/llap/windowing_gby.q.out b/ql/src/test/results/clientpositive/llap/windowing_gby.q.out
index 721066f..f8a0d18 100644
--- a/ql/src/test/results/clientpositive/llap/windowing_gby.q.out
+++ b/ql/src/test/results/clientpositive/llap/windowing_gby.q.out
@@ -47,7 +47,7 @@ Stage-0
                       PartitionCols:_col0
                       Group By Operator [GBY_10] (rows=3 width=20)
                         Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)","sum(_col1)"],keys:_col2
-                        Merge Join Operator [MERGEJOIN_34] (rows=27 width=7)
+                        Merge Join Operator [MERGEJOIN_34] (rows=36 width=7)
                           Conds:RS_37._col0=RS_40._col1(Inner),Output:["_col1","_col2","_col3"]
                         <-Map 1 [SIMPLE_EDGE] vectorized, llap
                           SHUFFLE [RS_37]
diff --git a/ql/src/test/results/clientpositive/masking_12.q.out b/ql/src/test/results/clientpositive/masking_12.q.out
index a3b4eb2..6140a98 100644
--- a/ql/src/test/results/clientpositive/masking_12.q.out
+++ b/ql/src/test/results/clientpositive/masking_12.q.out
@@ -460,14 +460,14 @@ STAGE PLANS:
             0 _col0 (type: int)
             1 _col0 (type: int)
           outputColumnNames: _col1
-          Statistics: Num rows: 4 Data size: 736 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 6 Data size: 1104 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col1 (type: string)
             outputColumnNames: _col0
-            Statistics: Num rows: 4 Data size: 736 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 6 Data size: 1104 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 4 Data size: 736 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 6 Data size: 1104 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query1.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query1.q.out
index 346a55c..453e6e3 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query1.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query1.q.out
@@ -76,13 +76,13 @@ Stage-0
       File Output Operator [FS_164]
         Limit [LIM_163] (rows=100 width=100)
           Number of rows:100
-          Select Operator [SEL_162] (rows=816091 width=100)
+          Select Operator [SEL_162] (rows=663970 width=100)
             Output:["_col0"]
           <-Reducer 4 [SIMPLE_EDGE]
             SHUFFLE [RS_51]
-              Select Operator [SEL_50] (rows=816091 width=100)
+              Select Operator [SEL_50] (rows=663970 width=100)
                 Output:["_col0"]
-                Merge Join Operator [MERGEJOIN_136] (rows=816091 width=100)
+                Merge Join Operator [MERGEJOIN_136] (rows=663970 width=100)
                   Conds:RS_47._col1=RS_161._col0(Inner),Output:["_col7"]
                 <-Map 12 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_161]
@@ -94,22 +94,22 @@ Stage-0
                 <-Reducer 3 [SIMPLE_EDGE]
                   SHUFFLE [RS_47]
                     PartitionCols:_col1
-                    Filter Operator [FIL_46] (rows=816091 width=225)
+                    Filter Operator [FIL_46] (rows=663970 width=225)
                       predicate:(_col3 > _col4)
-                      Merge Join Operator [MERGEJOIN_135] (rows=2448274 width=225)
+                      Merge Join Operator [MERGEJOIN_135] (rows=1991910 width=225)
                         Conds:RS_43._col2=RS_159._col1(Inner),Output:["_col1","_col3","_col4"]
                       <-Reducer 10 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_159]
                           PartitionCols:_col1
-                          Select Operator [SEL_158] (rows=31 width=115)
+                          Select Operator [SEL_158] (rows=29 width=115)
                             Output:["_col0","_col1"]
-                            Filter Operator [FIL_157] (rows=31 width=123)
+                            Filter Operator [FIL_157] (rows=29 width=123)
                               predicate:(_col1 is not null and _col2 is not null)
-                              Group By Operator [GBY_156] (rows=31 width=123)
+                              Group By Operator [GBY_156] (rows=29 width=123)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","count(_col2)"],keys:_col1
-                                Select Operator [SEL_155] (rows=14291868 width=119)
+                                Select Operator [SEL_155] (rows=13369812 width=119)
                                   Output:["_col1","_col2"]
-                                  Group By Operator [GBY_154] (rows=14291868 width=119)
+                                  Group By Operator [GBY_154] (rows=13369812 width=119)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                   <-Reducer 9 [SIMPLE_EDGE]
                                     SHUFFLE [RS_29]
@@ -139,7 +139,7 @@ Stage-0
                       <-Reducer 2 [ONE_TO_ONE_EDGE]
                         FORWARD [RS_43]
                           PartitionCols:_col2
-                          Merge Join Operator [MERGEJOIN_133] (rows=2369298 width=114)
+                          Merge Join Operator [MERGEJOIN_133] (rows=1923224 width=114)
                             Conds:RS_139._col0=RS_153._col1(Inner),Output:["_col1","_col2","_col3"]
                           <-Map 1 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_139]
@@ -153,11 +153,11 @@ Stage-0
                           <-Reducer 8 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_153]
                               PartitionCols:_col1
-                              Select Operator [SEL_152] (rows=14291868 width=119)
+                              Select Operator [SEL_152] (rows=11601100 width=119)
                                 Output:["_col0","_col1","_col2"]
-                                Filter Operator [FIL_151] (rows=14291868 width=119)
+                                Filter Operator [FIL_151] (rows=11601100 width=119)
                                   predicate:_col2 is not null
-                                  Group By Operator [GBY_150] (rows=14291868 width=119)
+                                  Group By Operator [GBY_150] (rows=11601100 width=119)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                   <-Reducer 7 [SIMPLE_EDGE]
                                     SHUFFLE [RS_14]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query10.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query10.q.out
index bd19a4f..4602033 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query10.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query10.q.out
@@ -173,28 +173,28 @@ Stage-0
                     PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                     Group By Operator [GBY_65] (rows=1 width=379)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"],aggregations:["count()"],keys:_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13
-                      Top N Key Operator [TNK_102] (rows=58 width=379)
+                      Top N Key Operator [TNK_102] (rows=52 width=379)
                         keys:_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13,sort order:++++++++,top n:100
-                        Select Operator [SEL_64] (rows=58 width=379)
+                        Select Operator [SEL_64] (rows=52 width=379)
                           Output:["_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                          Filter Operator [FIL_63] (rows=58 width=379)
+                          Filter Operator [FIL_63] (rows=52 width=379)
                             predicate:(_col15 is not null or _col17 is not null)
-                            Merge Join Operator [MERGEJOIN_180] (rows=58 width=379)
+                            Merge Join Operator [MERGEJOIN_180] (rows=52 width=379)
                               Conds:RS_60._col0=RS_217._col0(Left Outer),Output:["_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col15","_col17"]
                             <-Reducer 5 [ONE_TO_ONE_EDGE]
                               PARTITION_ONLY_SHUFFLE [RS_60]
                                 PartitionCols:_col0
-                                Merge Join Operator [MERGEJOIN_179] (rows=58 width=379)
+                                Merge Join Operator [MERGEJOIN_179] (rows=53 width=379)
                                   Conds:RS_57._col0=RS_209._col0(Left Outer),Output:["_col0","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col15"]
                                 <-Reducer 4 [ONE_TO_ONE_EDGE]
                                   FORWARD [RS_57]
                                     PartitionCols:_col0
-                                    Merge Join Operator [MERGEJOIN_178] (rows=22703 width=375)
+                                    Merge Join Operator [MERGEJOIN_178] (rows=20705 width=375)
                                       Conds:RS_54._col0=RS_55._col0(Left Semi),Output:["_col0","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
                                     <-Reducer 14 [SIMPLE_EDGE]
                                       SHUFFLE [RS_55]
                                         PartitionCols:_col0
-                                        Group By Operator [GBY_53] (rows=155827 width=2)
+                                        Group By Operator [GBY_53] (rows=142119 width=2)
                                           Output:["_col0"],keys:_col0
                                           Select Operator [SEL_17] (rows=57825495 width=2)
                                             Output:["_col0"]
@@ -267,14 +267,14 @@ Stage-0
                                 <-Reducer 18 [ONE_TO_ONE_EDGE] vectorized
                                   FORWARD [RS_209]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_208] (rows=155827 width=7)
+                                    Select Operator [SEL_208] (rows=155749 width=7)
                                       Output:["_col0","_col1"]
-                                      Group By Operator [GBY_207] (rows=155827 width=3)
+                                      Group By Operator [GBY_207] (rows=155749 width=3)
                                         Output:["_col0"],keys:KEY._col0
                                       <-Reducer 17 [SIMPLE_EDGE]
                                         SHUFFLE [RS_29]
                                           PartitionCols:_col0
-                                          Group By Operator [GBY_28] (rows=155827 width=3)
+                                          Group By Operator [GBY_28] (rows=155749 width=3)
                                             Output:["_col0"],keys:_col1
                                             Merge Join Operator [MERGEJOIN_176] (rows=15843227 width=3)
                                               Conds:RS_206._col0=RS_193._col0(Inner),Output:["_col1"]
@@ -299,20 +299,20 @@ Stage-0
                                                           FORWARD [RS_150]
                                                             Group By Operator [GBY_149] (rows=1 width=12)
                                                               Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                              Select Operator [SEL_148] (rows=22703 width=4)
+                                                              Select Operator [SEL_148] (rows=20705 width=4)
                                                                 Output:["_col0"]
                                                                  Please refer to the previous Merge Join Operator [MERGEJOIN_178]
                             <-Reducer 20 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_217]
                                 PartitionCols:_col0
-                                Select Operator [SEL_216] (rows=154725 width=7)
+                                Select Operator [SEL_216] (rows=153181 width=7)
                                   Output:["_col0","_col1"]
-                                  Group By Operator [GBY_215] (rows=154725 width=3)
+                                  Group By Operator [GBY_215] (rows=153181 width=3)
                                     Output:["_col0"],keys:KEY._col0
                                   <-Reducer 19 [SIMPLE_EDGE]
                                     SHUFFLE [RS_43]
                                       PartitionCols:_col0
-                                      Group By Operator [GBY_42] (rows=154725 width=3)
+                                      Group By Operator [GBY_42] (rows=153181 width=3)
                                         Output:["_col0"],keys:_col1
                                         Merge Join Operator [MERGEJOIN_177] (rows=31162251 width=3)
                                           Conds:RS_214._col0=RS_194._col0(Inner),Output:["_col1"]
@@ -337,7 +337,7 @@ Stage-0
                                                       PARTITION_ONLY_SHUFFLE [RS_165]
                                                         Group By Operator [GBY_164] (rows=1 width=12)
                                                           Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_163] (rows=58 width=4)
+                                                          Select Operator [SEL_163] (rows=53 width=4)
                                                             Output:["_col0"]
                                                              Please refer to the previous Merge Join Operator [MERGEJOIN_179]
 
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query14.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query14.q.out
index d6861ee..51cfb31 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query14.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query14.q.out
@@ -385,7 +385,7 @@ Stage-0
                                                 <-Reducer 34 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_230]
                                                     PartitionCols:_col0
-                                                    Merge Join Operator [MERGEJOIN_1169] (rows=724 width=4)
+                                                    Merge Join Operator [MERGEJOIN_1169] (rows=729 width=4)
                                                       Conds:RS_1347._col1, _col2, _col3=RS_1370._col0, _col1, _col2(Inner),Output:["_col0"]
                                                     <-Map 65 [SIMPLE_EDGE] vectorized
                                                       SHUFFLE [RS_1347]
@@ -402,20 +402,20 @@ Stage-0
                                                           Output:["_col0","_col1","_col2"]
                                                           Filter Operator [FIL_1368] (rows=1 width=20)
                                                             predicate:(_col3 = 3L)
-                                                            Group By Operator [GBY_1367] (rows=121728 width=19)
+                                                            Group By Operator [GBY_1367] (rows=120960 width=19)
                                                               Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                             <-Union 32 [SIMPLE_EDGE]
                                                               <-Reducer 31 [CONTAINS] vectorized
                                                                 Reduce Output Operator [RS_1424]
                                                                   PartitionCols:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1423] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1423] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                    Group By Operator [GBY_1422] (rows=121728 width=19)
+                                                                    Group By Operator [GBY_1422] (rows=120960 width=19)
                                                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                     <-Reducer 26 [SIMPLE_EDGE]
                                                                       SHUFFLE [RS_169]
                                                                         PartitionCols:_col0, _col1, _col2
-                                                                        Group By Operator [GBY_25] (rows=121728 width=19)
+                                                                        Group By Operator [GBY_25] (rows=120960 width=19)
                                                                           Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col4, _col5, _col6
                                                                           Merge Join Operator [MERGEJOIN_1151] (rows=14628613 width=11)
                                                                             Conds:RS_21._col1=RS_1344._col0(Inner),Output:["_col4","_col5","_col6"]
@@ -464,14 +464,14 @@ Stage-0
                                                               <-Reducer 44 [CONTAINS] vectorized
                                                                 Reduce Output Operator [RS_1438]
                                                                   PartitionCols:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1437] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1437] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                    Group By Operator [GBY_1436] (rows=121728 width=19)
+                                                                    Group By Operator [GBY_1436] (rows=120960 width=19)
                                                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                     <-Reducer 42 [SIMPLE_EDGE]
                                                                       SHUFFLE [RS_189]
                                                                         PartitionCols:_col0, _col1, _col2
-                                                                        Group By Operator [GBY_45] (rows=121728 width=19)
+                                                                        Group By Operator [GBY_45] (rows=120960 width=19)
                                                                           Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col4, _col5, _col6
                                                                           Merge Join Operator [MERGEJOIN_1153] (rows=7620440 width=11)
                                                                             Conds:RS_41._col1=RS_1345._col0(Inner),Output:["_col4","_col5","_col6"]
@@ -515,14 +515,14 @@ Stage-0
                                                               <-Reducer 50 [CONTAINS] vectorized
                                                                 Reduce Output Operator [RS_1452]
                                                                   PartitionCols:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1451] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1451] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                    Group By Operator [GBY_1450] (rows=121728 width=19)
+                                                                    Group By Operator [GBY_1450] (rows=120960 width=19)
                                                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                     <-Reducer 48 [SIMPLE_EDGE]
                                                                       SHUFFLE [RS_210]
                                                                         PartitionCols:_col0, _col1, _col2
-                                                                        Group By Operator [GBY_66] (rows=121728 width=19)
+                                                                        Group By Operator [GBY_66] (rows=120960 width=19)
                                                                           Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col4, _col5, _col6
                                                                           Merge Join Operator [MERGEJOIN_1155] (rows=3828623 width=11)
                                                                             Conds:RS_62._col1=RS_1346._col0(Inner),Output:["_col4","_col5","_col6"]
@@ -755,7 +755,7 @@ Stage-0
                                                 <-Reducer 38 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_374]
                                                     PartitionCols:_col0
-                                                    Merge Join Operator [MERGEJOIN_1182] (rows=724 width=4)
+                                                    Merge Join Operator [MERGEJOIN_1182] (rows=729 width=4)
                                                       Conds:RS_1348._col1, _col2, _col3=RS_1386._col0, _col1, _col2(Inner),Output:["_col0"]
                                                     <-Map 65 [SIMPLE_EDGE] vectorized
                                                       SHUFFLE [RS_1348]
@@ -772,15 +772,15 @@ Stage-0
                                                           Output:["_col0","_col1","_col2"]
                                                           Filter Operator [FIL_1384] (rows=1 width=20)
                                                             predicate:(_col3 = 3L)
-                                                            Group By Operator [GBY_1383] (rows=121728 width=19)
+                                                            Group By Operator [GBY_1383] (rows=120960 width=19)
                                                               Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                             <-Union 36 [SIMPLE_EDGE]
                                                               <-Reducer 35 [CONTAINS] vectorized
                                                                 Reduce Output Operator [RS_1427]
                                                                   PartitionCols:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1426] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1426] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                    Group By Operator [GBY_1425] (rows=121728 width=19)
+                                                                    Group By Operator [GBY_1425] (rows=120960 width=19)
                                                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                     <-Reducer 26 [SIMPLE_EDGE]
                                                                       SHUFFLE [RS_313]
@@ -789,9 +789,9 @@ Stage-0
                                                               <-Reducer 45 [CONTAINS] vectorized
                                                                 Reduce Output Operator [RS_1441]
                                                                   PartitionCols:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1440] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1440] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                    Group By Operator [GBY_1439] (rows=121728 width=19)
+                                                                    Group By Operator [GBY_1439] (rows=120960 width=19)
                                                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                     <-Reducer 42 [SIMPLE_EDGE]
                                                                       SHUFFLE [RS_333]
@@ -800,9 +800,9 @@ Stage-0
                                                               <-Reducer 51 [CONTAINS] vectorized
                                                                 Reduce Output Operator [RS_1455]
                                                                   PartitionCols:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1454] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1454] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                    Group By Operator [GBY_1453] (rows=121728 width=19)
+                                                                    Group By Operator [GBY_1453] (rows=120960 width=19)
                                                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                     <-Reducer 48 [SIMPLE_EDGE]
                                                                       SHUFFLE [RS_354]
@@ -942,7 +942,7 @@ Stage-0
                                                 <-Reducer 30 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_87]
                                                     PartitionCols:_col0
-                                                    Merge Join Operator [MERGEJOIN_1156] (rows=724 width=4)
+                                                    Merge Join Operator [MERGEJOIN_1156] (rows=729 width=4)
                                                       Conds:RS_1343._col1, _col2, _col3=RS_1324._col0, _col1, _col2(Inner),Output:["_col0"]
                                                     <-Map 65 [SIMPLE_EDGE] vectorized
                                                       SHUFFLE [RS_1343]
@@ -959,15 +959,15 @@ Stage-0
                                                           Output:["_col0","_col1","_col2"]
                                                           Filter Operator [FIL_1322] (rows=1 width=20)
                                                             predicate:(_col3 = 3L)
-                                                            Group By Operator [GBY_1321] (rows=121728 width=19)
+                                                            Group By Operator [GBY_1321] (rows=120960 width=19)
                                                               Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                             <-Union 28 [SIMPLE_EDGE]
                                                               <-Reducer 27 [CONTAINS] vectorized
                                                                 Reduce Output Operator [RS_1421]
                                                                   PartitionCols:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1420] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1420] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                    Group By Operator [GBY_1419] (rows=121728 width=19)
+                                                                    Group By Operator [GBY_1419] (rows=120960 width=19)
                                                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                     <-Reducer 26 [SIMPLE_EDGE]
                                                                       SHUFFLE [RS_26]
@@ -976,9 +976,9 @@ Stage-0
                                                               <-Reducer 43 [CONTAINS] vectorized
                                                                 Reduce Output Operator [RS_1435]
                                                                   PartitionCols:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1434] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1434] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                    Group By Operator [GBY_1433] (rows=121728 width=19)
+                                                                    Group By Operator [GBY_1433] (rows=120960 width=19)
                                                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                     <-Reducer 42 [SIMPLE_EDGE]
                                                                       SHUFFLE [RS_46]
@@ -987,9 +987,9 @@ Stage-0
                                                               <-Reducer 49 [CONTAINS] vectorized
                                                                 Reduce Output Operator [RS_1449]
                                                                   PartitionCols:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1448] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1448] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                    Group By Operator [GBY_1447] (rows=121728 width=19)
+                                                                    Group By Operator [GBY_1447] (rows=120960 width=19)
                                                                       Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                     <-Reducer 48 [SIMPLE_EDGE]
                                                                       SHUFFLE [RS_67]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query17.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query17.q.out
index 0b459e0..07b6748 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query17.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query17.q.out
@@ -125,24 +125,24 @@ Stage-0
       File Output Operator [FS_248]
         Limit [LIM_247] (rows=100 width=466)
           Number of rows:100
-          Select Operator [SEL_246] (rows=8581091679 width=466)
+          Select Operator [SEL_246] (rows=8667503740 width=466)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_245]
-              Select Operator [SEL_244] (rows=8581091679 width=466)
+              Select Operator [SEL_244] (rows=8667503740 width=466)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                Group By Operator [GBY_243] (rows=8581091679 width=466)
+                Group By Operator [GBY_243] (rows=8667503740 width=466)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["count(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","count(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","count(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_48]
                     PartitionCols:_col0, _col1, _col2
-                    Group By Operator [GBY_47] (rows=8581091679 width=466)
+                    Group By Operator [GBY_47] (rows=8667503740 width=466)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["count(_col3)","sum(_col3)","sum(_col7)","sum(_col6)","count(_col4)","sum(_col4)","sum(_col9)","sum(_col8)","count(_col5)","sum(_col5)","sum(_col11)","sum(_col10)"],keys:_col0, _col1, _col2
-                      Top N Key Operator [TNK_94] (rows=8581091679 width=381)
+                      Top N Key Operator [TNK_94] (rows=8667503740 width=381)
                         keys:_col0, _col1, _col2,sort order:+++,top n:100
-                        Select Operator [SEL_45] (rows=8581091679 width=381)
+                        Select Operator [SEL_45] (rows=8667503740 width=381)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-                          Merge Join Operator [MERGEJOIN_210] (rows=8581091679 width=381)
+                          Merge Join Operator [MERGEJOIN_210] (rows=8667503740 width=381)
                             Conds:RS_42._col6=RS_242._col0(Inner),Output:["_col3","_col10","_col16","_col19","_col21","_col22"]
                           <-Map 17 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_242]
@@ -154,7 +154,7 @@ Stage-0
                           <-Reducer 4 [SIMPLE_EDGE]
                             SHUFFLE [RS_42]
                               PartitionCols:_col6
-                              Merge Join Operator [MERGEJOIN_209] (rows=8581091679 width=101)
+                              Merge Join Operator [MERGEJOIN_209] (rows=8667503740 width=101)
                                 Conds:RS_39._col8=RS_240._col0(Inner),Output:["_col3","_col6","_col10","_col16","_col19"]
                               <-Map 16 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_240]
@@ -166,7 +166,7 @@ Stage-0
                               <-Reducer 3 [SIMPLE_EDGE]
                                 SHUFFLE [RS_39]
                                   PartitionCols:_col8
-                                  Merge Join Operator [MERGEJOIN_208] (rows=8581091679 width=19)
+                                  Merge Join Operator [MERGEJOIN_208] (rows=8667503740 width=19)
                                     Conds:RS_36._col1, _col2=RS_37._col9, _col8(Inner),Output:["_col3","_col6","_col8","_col10","_col16"]
                                   <-Reducer 11 [SIMPLE_EDGE]
                                     SHUFFLE [RS_37]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query18.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query18.q.out
index 786f2ea..133971d 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query18.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query18.q.out
@@ -100,20 +100,20 @@ Stage-0
       File Output Operator [FS_174]
         Limit [LIM_173] (rows=100 width=1165)
           Number of rows:100
-          Select Operator [SEL_172] (rows=11124280 width=1165)
+          Select Operator [SEL_172] (rows=11292800 width=1165)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_171]
-              Select Operator [SEL_170] (rows=11124280 width=1165)
+              Select Operator [SEL_170] (rows=11292800 width=1165)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
-                Group By Operator [GBY_169] (rows=11124280 width=1229)
+                Group By Operator [GBY_169] (rows=11292800 width=1229)
                   Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)","sum(VALUE._col2)","count(VALUE._col3)","sum(VALUE._col4)","count(VALUE._col5)","sum(VALUE._col6)","count(VALUE._col7)","sum(VALUE._col8)","count(VALUE._col9)","sum(VALUE._col10)","count(VALUE._col11)","sum(VALUE._col12)","count(VALUE._col13)"],keys:KEY._col [...]
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_40]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_39] (rows=11124280 width=1229)
+                    Group By Operator [GBY_39] (rows=11292800 width=1229)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"],aggregations:["sum(_col12)","count(_col12)","sum(_col13)","count(_col13)","sum(_col14)","count(_col14)","sum(_col15)","count(_col15)","sum(_col16)","count(_col16)","sum(_col3)","count(_col3)","sum(_col19)","count(_col19)"],keys:_col21, _col5, _col6, _col7, 0L
-                      Merge Join Operator [MERGEJOIN_144] (rows=2224856 width=816)
+                      Merge Join Operator [MERGEJOIN_144] (rows=2258560 width=821)
                         Conds:RS_35._col1=RS_168._col0(Inner),Output:["_col3","_col5","_col6","_col7","_col12","_col13","_col14","_col15","_col16","_col19","_col21"]
                       <-Map 16 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_168]
@@ -125,7 +125,7 @@ Stage-0
                       <-Reducer 4 [SIMPLE_EDGE]
                         SHUFFLE [RS_35]
                           PartitionCols:_col1
-                          Merge Join Operator [MERGEJOIN_143] (rows=2193833 width=813)
+                          Merge Join Operator [MERGEJOIN_143] (rows=2227067 width=818)
                             Conds:RS_32._col11=RS_166._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col12","_col13","_col14","_col15","_col16","_col19","_col21"]
                           <-Map 15 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_166]
@@ -137,12 +137,12 @@ Stage-0
                           <-Reducer 3 [SIMPLE_EDGE]
                             SHUFFLE [RS_32]
                               PartitionCols:_col11
-                              Merge Join Operator [MERGEJOIN_142] (rows=2193833 width=717)
+                              Merge Join Operator [MERGEJOIN_142] (rows=2227067 width=722)
                                 Conds:RS_29._col0=RS_30._col1(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col11","_col12","_col13","_col14","_col15","_col16","_col19"]
                               <-Reducer 11 [SIMPLE_EDGE]
                                 SHUFFLE [RS_30]
                                   PartitionCols:_col1
-                                  Merge Join Operator [MERGEJOIN_141] (rows=15983636 width=639)
+                                  Merge Join Operator [MERGEJOIN_141] (rows=16225774 width=640)
                                     Conds:RS_18._col2=RS_164._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7","_col8","_col11"]
                                   <-Map 14 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_164]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query2.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query2.q.out
index 4d5d255..fbb1409 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query2.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query2.q.out
@@ -142,13 +142,13 @@ Stage-0
     Stage-1
       Reducer 7 vectorized
       File Output Operator [FS_173]
-        Select Operator [SEL_172] (rows=12881 width=788)
+        Select Operator [SEL_172] (rows=70850 width=788)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
         <-Reducer 6 [SIMPLE_EDGE]
           SHUFFLE [RS_57]
-            Select Operator [SEL_56] (rows=12881 width=788)
+            Select Operator [SEL_56] (rows=70850 width=788)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-              Merge Join Operator [MERGEJOIN_146] (rows=12881 width=1572)
+              Merge Join Operator [MERGEJOIN_146] (rows=70850 width=1572)
                 Conds:RS_53._col0=RS_54.(_col0 - 53)(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col10","_col11","_col12","_col13","_col14","_col15","_col16"]
               <-Reducer 5 [ONE_TO_ONE_EDGE]
                 FORWARD [RS_53]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query23.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query23.q.out
index 34bfd53..60293bc 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query23.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query23.q.out
@@ -211,18 +211,18 @@ Stage-0
                       <-Reducer 24 [ONE_TO_ONE_EDGE] vectorized
                         FORWARD [RS_456]
                           PartitionCols:_col0
-                          Group By Operator [GBY_455] (rows=235937 width=3)
+                          Group By Operator [GBY_455] (rows=225322 width=3)
                             Output:["_col0"],keys:KEY._col0
                           <-Reducer 23 [SIMPLE_EDGE]
                             SHUFFLE [RS_120]
                               PartitionCols:_col0
-                              Group By Operator [GBY_119] (rows=235937 width=3)
+                              Group By Operator [GBY_119] (rows=225322 width=3)
                                 Output:["_col0"],keys:_col0
-                                Select Operator [SEL_118] (rows=471875 width=227)
+                                Select Operator [SEL_118] (rows=450644 width=227)
                                   Output:["_col0"]
-                                  Filter Operator [FIL_117] (rows=471875 width=227)
+                                  Filter Operator [FIL_117] (rows=450644 width=227)
                                     predicate:(_col1 > _col2)
-                                    Merge Join Operator [MERGEJOIN_360] (rows=1415626 width=227)
+                                    Merge Join Operator [MERGEJOIN_360] (rows=1351934 width=227)
                                       Conds:(Inner),Output:["_col0","_col1","_col2"]
                                     <-Reducer 22 [CUSTOM_SIMPLE_EDGE] vectorized
                                       PARTITION_ONLY_SHUFFLE [RS_417]
@@ -236,14 +236,14 @@ Stage-0
                                               PARTITION_ONLY_SHUFFLE [RS_412]
                                                 Group By Operator [GBY_411] (rows=1 width=112)
                                                   Output:["_col0"],aggregations:["max(_col1)"]
-                                                  Select Operator [SEL_410] (rows=50562 width=112)
+                                                  Select Operator [SEL_410] (rows=46114 width=112)
                                                     Output:["_col1"]
-                                                    Group By Operator [GBY_409] (rows=50562 width=112)
+                                                    Group By Operator [GBY_409] (rows=46114 width=112)
                                                       Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                                                     <-Reducer 20 [SIMPLE_EDGE]
                                                       SHUFFLE [RS_26]
                                                         PartitionCols:_col0
-                                                        Group By Operator [GBY_25] (rows=455058 width=112)
+                                                        Group By Operator [GBY_25] (rows=415026 width=112)
                                                           Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col1
                                                           Merge Join Operator [MERGEJOIN_351] (rows=18762463 width=112)
                                                             Conds:RS_408._col0=RS_400._col0(Inner),Output:["_col1","_col2"]
@@ -278,9 +278,9 @@ Stage-0
                                                                                Please refer to the previous Select Operator [SEL_399]
                                     <-Reducer 37 [CUSTOM_SIMPLE_EDGE] vectorized
                                       PARTITION_ONLY_SHUFFLE [RS_454]
-                                        Filter Operator [FIL_453] (rows=1415626 width=115)
+                                        Filter Operator [FIL_453] (rows=1351934 width=115)
                                           predicate:_col1 is not null
-                                          Group By Operator [GBY_452] (rows=1415626 width=115)
+                                          Group By Operator [GBY_452] (rows=1351934 width=115)
                                             Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                                           <-Map 36 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_451]
@@ -410,27 +410,27 @@ Stage-0
                       <-Reducer 18 [ONE_TO_ONE_EDGE] vectorized
                         FORWARD [RS_419]
                           PartitionCols:_col0
-                          Group By Operator [GBY_418] (rows=235937 width=3)
+                          Group By Operator [GBY_418] (rows=225322 width=3)
                             Output:["_col0"],keys:KEY._col0
                           <-Reducer 17 [SIMPLE_EDGE]
                             SHUFFLE [RS_42]
                               PartitionCols:_col0
-                              Group By Operator [GBY_41] (rows=235937 width=3)
+                              Group By Operator [GBY_41] (rows=225322 width=3)
                                 Output:["_col0"],keys:_col0
-                                Select Operator [SEL_40] (rows=471875 width=227)
+                                Select Operator [SEL_40] (rows=450644 width=227)
                                   Output:["_col0"]
-                                  Filter Operator [FIL_39] (rows=471875 width=227)
+                                  Filter Operator [FIL_39] (rows=450644 width=227)
                                     predicate:(_col1 > _col2)
-                                    Merge Join Operator [MERGEJOIN_358] (rows=1415626 width=227)
+                                    Merge Join Operator [MERGEJOIN_358] (rows=1351934 width=227)
                                       Conds:(Inner),Output:["_col0","_col1","_col2"]
                                     <-Reducer 22 [CUSTOM_SIMPLE_EDGE] vectorized
                                       PARTITION_ONLY_SHUFFLE [RS_416]
                                          Please refer to the previous Select Operator [SEL_415]
                                     <-Reducer 16 [CUSTOM_SIMPLE_EDGE] vectorized
                                       PARTITION_ONLY_SHUFFLE [RS_397]
-                                        Filter Operator [FIL_396] (rows=1415626 width=115)
+                                        Filter Operator [FIL_396] (rows=1351934 width=115)
                                           predicate:_col1 is not null
-                                          Group By Operator [GBY_395] (rows=1415626 width=115)
+                                          Group By Operator [GBY_395] (rows=1351934 width=115)
                                             Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                                           <-Map 15 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_394]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query25.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query25.q.out
index efa3b98..ab95fb8 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query25.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query25.q.out
@@ -131,20 +131,20 @@ Stage-0
       File Output Operator [FS_246]
         Limit [LIM_245] (rows=100 width=808)
           Number of rows:100
-          Select Operator [SEL_244] (rows=4248052730 width=808)
+          Select Operator [SEL_244] (rows=4290851668 width=808)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_243]
-              Group By Operator [GBY_242] (rows=4248052730 width=808)
+              Group By Operator [GBY_242] (rows=4290851668 width=808)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
               <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_47]
                   PartitionCols:_col0, _col1, _col2, _col3
-                  Group By Operator [GBY_46] (rows=4248052730 width=808)
+                  Group By Operator [GBY_46] (rows=4290851668 width=808)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col10)","sum(_col16)","sum(_col3)"],keys:_col22, _col23, _col19, _col20
-                    Top N Key Operator [TNK_93] (rows=4248052730 width=807)
+                    Top N Key Operator [TNK_93] (rows=4290851668 width=807)
                       keys:_col22, _col23, _col19, _col20,sort order:++++,top n:100
-                      Merge Join Operator [MERGEJOIN_209] (rows=4248052730 width=807)
+                      Merge Join Operator [MERGEJOIN_209] (rows=4290851668 width=807)
                         Conds:RS_42._col6=RS_241._col0(Inner),Output:["_col3","_col10","_col16","_col19","_col20","_col22","_col23"]
                       <-Map 17 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_241]
@@ -156,7 +156,7 @@ Stage-0
                       <-Reducer 4 [SIMPLE_EDGE]
                         SHUFFLE [RS_42]
                           PartitionCols:_col6
-                          Merge Join Operator [MERGEJOIN_208] (rows=4248052730 width=527)
+                          Merge Join Operator [MERGEJOIN_208] (rows=4290851668 width=527)
                             Conds:RS_39._col8=RS_239._col0(Inner),Output:["_col3","_col6","_col10","_col16","_col19","_col20"]
                           <-Map 16 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_239]
@@ -168,7 +168,7 @@ Stage-0
                           <-Reducer 3 [SIMPLE_EDGE]
                             SHUFFLE [RS_39]
                               PartitionCols:_col8
-                              Merge Join Operator [MERGEJOIN_207] (rows=4248052730 width=343)
+                              Merge Join Operator [MERGEJOIN_207] (rows=4290851668 width=343)
                                 Conds:RS_36._col1, _col2=RS_37._col9, _col8(Inner),Output:["_col3","_col6","_col8","_col10","_col16"]
                               <-Reducer 11 [SIMPLE_EDGE]
                                 SHUFFLE [RS_37]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query26.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query26.q.out
index 2dd8b8a..2b0ba1c 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query26.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query26.q.out
@@ -83,9 +83,9 @@ Stage-0
                     PartitionCols:_col0
                     Group By Operator [GBY_27] (rows=462000 width=476)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"],aggregations:["sum(_col4)","count(_col4)","sum(_col5)","count(_col5)","sum(_col7)","count(_col7)","sum(_col6)","count(_col6)"],keys:_col12
-                      Top N Key Operator [TNK_54] (rows=809521 width=100)
+                      Top N Key Operator [TNK_54] (rows=821787 width=100)
                         keys:_col12,sort order:+,top n:100
-                        Merge Join Operator [MERGEJOIN_98] (rows=809521 width=100)
+                        Merge Join Operator [MERGEJOIN_98] (rows=821787 width=100)
                           Conds:RS_23._col2=RS_117._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col12"]
                         <-Map 12 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_117]
@@ -97,7 +97,7 @@ Stage-0
                         <-Reducer 4 [SIMPLE_EDGE]
                           SHUFFLE [RS_23]
                             PartitionCols:_col2
-                            Merge Join Operator [MERGEJOIN_97] (rows=809521 width=4)
+                            Merge Join Operator [MERGEJOIN_97] (rows=821787 width=4)
                               Conds:RS_20._col3=RS_115._col0(Inner),Output:["_col2","_col4","_col5","_col6","_col7"]
                             <-Map 11 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_115]
@@ -111,7 +111,7 @@ Stage-0
                             <-Reducer 3 [SIMPLE_EDGE]
                               SHUFFLE [RS_20]
                                 PartitionCols:_col3
-                                Merge Join Operator [MERGEJOIN_96] (rows=809521 width=4)
+                                Merge Join Operator [MERGEJOIN_96] (rows=821787 width=4)
                                   Conds:RS_17._col0=RS_112._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6","_col7"]
                                 <-Map 10 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_112]
@@ -125,7 +125,7 @@ Stage-0
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_17]
                                     PartitionCols:_col0
-                                    Merge Join Operator [MERGEJOIN_95] (rows=2283326 width=135)
+                                    Merge Join Operator [MERGEJOIN_95] (rows=2317924 width=139)
                                       Conds:RS_109._col1=RS_101._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7"]
                                     <-Map 8 [SIMPLE_EDGE] vectorized
                                       PARTITION_ONLY_SHUFFLE [RS_101]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query27.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query27.q.out
index c84ad20..2a3711f 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query27.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query27.q.out
@@ -74,24 +74,24 @@ Stage-0
       File Output Operator [FS_124]
         Limit [LIM_123] (rows=100 width=538)
           Number of rows:100
-          Select Operator [SEL_122] (rows=4281825 width=538)
+          Select Operator [SEL_122] (rows=4916010 width=538)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_121]
-              Select Operator [SEL_120] (rows=4281825 width=538)
+              Select Operator [SEL_120] (rows=4916010 width=538)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                Group By Operator [GBY_119] (rows=4281825 width=570)
+                Group By Operator [GBY_119] (rows=4916010 width=570)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)","sum(VALUE._col2)","count(VALUE._col3)","sum(VALUE._col4)","count(VALUE._col5)","sum(VALUE._col6)","count(VALUE._col7)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_29]
                     PartitionCols:_col0, _col1, _col2
-                    Group By Operator [GBY_28] (rows=4281825 width=570)
+                    Group By Operator [GBY_28] (rows=4916010 width=570)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"],aggregations:["sum(_col2)","count(_col2)","sum(_col3)","count(_col3)","sum(_col4)","count(_col4)","sum(_col5)","count(_col5)"],keys:_col0, _col1, 0L
-                      Top N Key Operator [TNK_55] (rows=1427275 width=186)
+                      Top N Key Operator [TNK_55] (rows=1638670 width=186)
                         keys:_col0, _col1, 0L,sort order:+++,top n:100
-                        Select Operator [SEL_26] (rows=1427275 width=186)
+                        Select Operator [SEL_26] (rows=1638670 width=186)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                          Merge Join Operator [MERGEJOIN_99] (rows=1427275 width=186)
+                          Merge Join Operator [MERGEJOIN_99] (rows=1638670 width=186)
                             Conds:RS_23._col1=RS_118._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col11","_col13"]
                           <-Map 12 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_118]
@@ -103,7 +103,7 @@ Stage-0
                           <-Reducer 4 [SIMPLE_EDGE]
                             SHUFFLE [RS_23]
                               PartitionCols:_col1
-                              Merge Join Operator [MERGEJOIN_98] (rows=1427275 width=90)
+                              Merge Join Operator [MERGEJOIN_98] (rows=1638670 width=90)
                                 Conds:RS_20._col3=RS_116._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col11"]
                               <-Map 11 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_116]
@@ -117,7 +117,7 @@ Stage-0
                               <-Reducer 3 [SIMPLE_EDGE]
                                 SHUFFLE [RS_20]
                                   PartitionCols:_col3
-                                  Merge Join Operator [MERGEJOIN_97] (rows=1441779 width=4)
+                                  Merge Join Operator [MERGEJOIN_97] (rows=1655322 width=4)
                                     Conds:RS_17._col0=RS_113._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7"]
                                   <-Map 10 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_113]
@@ -131,7 +131,7 @@ Stage-0
                                   <-Reducer 2 [SIMPLE_EDGE]
                                     SHUFFLE [RS_17]
                                       PartitionCols:_col0
-                                      Merge Join Operator [MERGEJOIN_96] (rows=4037920 width=4)
+                                      Merge Join Operator [MERGEJOIN_96] (rows=4635978 width=4)
                                         Conds:RS_110._col2=RS_102._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
                                       <-Map 8 [SIMPLE_EDGE] vectorized
                                         PARTITION_ONLY_SHUFFLE [RS_102]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query29.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query29.q.out
index 74f6390..3e1c9d6 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query29.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query29.q.out
@@ -129,20 +129,20 @@ Stage-0
       File Output Operator [FS_246]
         Limit [LIM_245] (rows=100 width=496)
           Number of rows:100
-          Select Operator [SEL_244] (rows=4156223234 width=496)
+          Select Operator [SEL_244] (rows=4290826997 width=496)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_243]
-              Group By Operator [GBY_242] (rows=4156223234 width=496)
+              Group By Operator [GBY_242] (rows=4290826997 width=496)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
               <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_47]
                   PartitionCols:_col0, _col1, _col2, _col3
-                  Group By Operator [GBY_46] (rows=4156223234 width=496)
+                  Group By Operator [GBY_46] (rows=4290826997 width=496)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col10)","sum(_col16)","sum(_col3)"],keys:_col22, _col23, _col19, _col20
-                    Top N Key Operator [TNK_93] (rows=4156223234 width=483)
+                    Top N Key Operator [TNK_93] (rows=4290826997 width=483)
                       keys:_col22, _col23, _col19, _col20,sort order:++++,top n:100
-                      Merge Join Operator [MERGEJOIN_209] (rows=4156223234 width=483)
+                      Merge Join Operator [MERGEJOIN_209] (rows=4290826997 width=483)
                         Conds:RS_42._col6=RS_241._col0(Inner),Output:["_col3","_col10","_col16","_col19","_col20","_col22","_col23"]
                       <-Map 18 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_241]
@@ -154,7 +154,7 @@ Stage-0
                       <-Reducer 4 [SIMPLE_EDGE]
                         SHUFFLE [RS_42]
                           PartitionCols:_col6
-                          Merge Join Operator [MERGEJOIN_208] (rows=4156223234 width=203)
+                          Merge Join Operator [MERGEJOIN_208] (rows=4290826997 width=203)
                             Conds:RS_39._col8=RS_239._col0(Inner),Output:["_col3","_col6","_col10","_col16","_col19","_col20"]
                           <-Map 17 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_239]
@@ -166,7 +166,7 @@ Stage-0
                           <-Reducer 3 [SIMPLE_EDGE]
                             SHUFFLE [RS_39]
                               PartitionCols:_col8
-                              Merge Join Operator [MERGEJOIN_207] (rows=4156223234 width=19)
+                              Merge Join Operator [MERGEJOIN_207] (rows=4290826997 width=19)
                                 Conds:RS_36._col1, _col2=RS_37._col9, _col8(Inner),Output:["_col3","_col6","_col8","_col10","_col16"]
                               <-Reducer 12 [SIMPLE_EDGE]
                                 SHUFFLE [RS_37]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query30.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query30.q.out
index 183105f..f3b3229 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query30.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query30.q.out
@@ -90,13 +90,13 @@ Stage-0
       File Output Operator [FS_215]
         Limit [LIM_214] (rows=100 width=942)
           Number of rows:100
-          Select Operator [SEL_213] (rows=691171 width=942)
+          Select Operator [SEL_213] (rows=601923 width=942)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
           <-Reducer 3 [SIMPLE_EDGE]
             SHUFFLE [RS_66]
-              Select Operator [SEL_65] (rows=691171 width=942)
+              Select Operator [SEL_65] (rows=601923 width=942)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
-                Merge Join Operator [MERGEJOIN_180] (rows=691171 width=942)
+                Merge Join Operator [MERGEJOIN_180] (rows=601923 width=942)
                   Conds:RS_62._col0=RS_63._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col17"]
                 <-Reducer 2 [SIMPLE_EDGE]
                   SHUFFLE [RS_62]
@@ -124,11 +124,11 @@ Stage-0
                 <-Reducer 8 [SIMPLE_EDGE]
                   SHUFFLE [RS_63]
                     PartitionCols:_col0
-                    Select Operator [SEL_58] (rows=704993 width=227)
+                    Select Operator [SEL_58] (rows=613960 width=227)
                       Output:["_col0","_col2"]
-                      Filter Operator [FIL_57] (rows=704993 width=227)
+                      Filter Operator [FIL_57] (rows=613960 width=227)
                         predicate:(_col2 > _col3)
-                        Merge Join Operator [MERGEJOIN_179] (rows=2114980 width=227)
+                        Merge Join Operator [MERGEJOIN_179] (rows=1841880 width=227)
                           Conds:RS_206._col1=RS_212._col1(Inner),Output:["_col0","_col2","_col3"]
                         <-Reducer 10 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_212]
@@ -184,11 +184,11 @@ Stage-0
                         <-Reducer 7 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_206]
                             PartitionCols:_col1
-                            Filter Operator [FIL_205] (rows=2114980 width=201)
+                            Filter Operator [FIL_205] (rows=1841880 width=201)
                               predicate:_col2 is not null
-                              Select Operator [SEL_204] (rows=2114980 width=201)
+                              Select Operator [SEL_204] (rows=1841880 width=201)
                                 Output:["_col0","_col1","_col2"]
-                                Group By Operator [GBY_203] (rows=2114980 width=201)
+                                Group By Operator [GBY_203] (rows=1841880 width=201)
                                   Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                 <-Reducer 6 [SIMPLE_EDGE]
                                   SHUFFLE [RS_23]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query33.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query33.q.out
index f23ae02..acd2c04 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query33.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query33.q.out
@@ -192,33 +192,33 @@ Stage-0
     Stage-1
       Reducer 7 vectorized
       File Output Operator [FS_357]
-        Limit [LIM_356] (rows=59 width=115)
+        Limit [LIM_356] (rows=2 width=114)
           Number of rows:100
-          Select Operator [SEL_355] (rows=59 width=115)
+          Select Operator [SEL_355] (rows=2 width=114)
             Output:["_col0","_col1"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_354]
-              Group By Operator [GBY_353] (rows=59 width=115)
+              Group By Operator [GBY_353] (rows=2 width=114)
                 Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
               <-Union 5 [SIMPLE_EDGE]
                 <-Reducer 11 [CONTAINS] vectorized
                   Reduce Output Operator [RS_373]
                     PartitionCols:_col0
-                    Group By Operator [GBY_372] (rows=59 width=115)
+                    Group By Operator [GBY_372] (rows=2 width=114)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_371] (rows=19 width=115)
+                      Group By Operator [GBY_371] (rows=2 width=114)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 10 [SIMPLE_EDGE]
                         SHUFFLE [RS_109]
                           PartitionCols:_col0
-                          Group By Operator [GBY_108] (rows=19 width=115)
+                          Group By Operator [GBY_108] (rows=2 width=114)
                             Output:["_col0","_col1"],aggregations:["sum(_col7)"],keys:_col1
-                            Merge Join Operator [MERGEJOIN_304] (rows=11364 width=3)
+                            Merge Join Operator [MERGEJOIN_304] (rows=1134 width=0)
                               Conds:RS_104._col0=RS_105._col2(Inner),Output:["_col1","_col7"]
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_104]
                                 PartitionCols:_col0
-                                Merge Join Operator [MERGEJOIN_293] (rows=461514 width=7)
+                                Merge Join Operator [MERGEJOIN_293] (rows=46084 width=7)
                                   Conds:RS_319._col1=RS_325._col0(Inner),Output:["_col0","_col1"]
                                 <-Map 1 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_319]
@@ -232,12 +232,12 @@ Stage-0
                                 <-Reducer 13 [ONE_TO_ONE_EDGE] vectorized
                                   FORWARD [RS_325]
                                     PartitionCols:_col0
-                                    Group By Operator [GBY_324] (rows=692 width=3)
+                                    Group By Operator [GBY_324] (rows=69 width=4)
                                       Output:["_col0"],keys:KEY._col0
                                     <-Map 12 [SIMPLE_EDGE] vectorized
                                       SHUFFLE [RS_323]
                                         PartitionCols:_col0
-                                        Group By Operator [GBY_322] (rows=692 width=3)
+                                        Group By Operator [GBY_322] (rows=70 width=4)
                                           Output:["_col0"],keys:i_manufact_id
                                           Select Operator [SEL_321] (rows=46085 width=93)
                                             Output:["i_manufact_id"]
@@ -298,16 +298,16 @@ Stage-0
                 <-Reducer 4 [CONTAINS] vectorized
                   Reduce Output Operator [RS_352]
                     PartitionCols:_col0
-                    Group By Operator [GBY_351] (rows=59 width=115)
+                    Group By Operator [GBY_351] (rows=2 width=114)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_350] (rows=64 width=115)
+                      Group By Operator [GBY_350] (rows=2 width=116)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 3 [SIMPLE_EDGE]
                         SHUFFLE [RS_34]
                           PartitionCols:_col0
-                          Group By Operator [GBY_33] (rows=64 width=115)
+                          Group By Operator [GBY_33] (rows=2 width=116)
                             Output:["_col0","_col1"],aggregations:["sum(_col7)"],keys:_col1
-                            Merge Join Operator [MERGEJOIN_302] (rows=41476 width=3)
+                            Merge Join Operator [MERGEJOIN_302] (rows=4136 width=2)
                               Conds:RS_29._col0=RS_30._col2(Inner),Output:["_col1","_col7"]
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_29]
@@ -356,16 +356,16 @@ Stage-0
                 <-Reducer 9 [CONTAINS] vectorized
                   Reduce Output Operator [RS_365]
                     PartitionCols:_col0
-                    Group By Operator [GBY_364] (rows=59 width=115)
+                    Group By Operator [GBY_364] (rows=2 width=114)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_363] (rows=35 width=115)
+                      Group By Operator [GBY_363] (rows=2 width=116)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 8 [SIMPLE_EDGE]
                         SHUFFLE [RS_71]
                           PartitionCols:_col0
-                          Group By Operator [GBY_70] (rows=35 width=115)
+                          Group By Operator [GBY_70] (rows=2 width=116)
                             Output:["_col0","_col1"],aggregations:["sum(_col7)"],keys:_col1
-                            Merge Join Operator [MERGEJOIN_303] (rows=22352 width=3)
+                            Merge Join Operator [MERGEJOIN_303] (rows=2229 width=1)
                               Conds:RS_66._col0=RS_67._col3(Inner),Output:["_col1","_col7"]
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_66]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query35.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query35.q.out
index 9adeaa9..85fdceb 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query35.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query35.q.out
@@ -169,28 +169,28 @@ Stage-0
                     PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
                     Group By Operator [GBY_65] (rows=1 width=336)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15"],aggregations:["count()","sum(_col8)","count(_col8)","max(_col8)","sum(_col9)","count(_col9)","max(_col9)","sum(_col10)","count(_col10)","max(_col10)"],keys:_col4, _col6, _col7, _col8, _col9, _col10
-                      Top N Key Operator [TNK_103] (rows=67 width=276)
+                      Top N Key Operator [TNK_103] (rows=61 width=276)
                         keys:_col4, _col6, _col7, _col8, _col9, _col10,sort order:++++++,top n:100
-                        Select Operator [SEL_64] (rows=67 width=276)
+                        Select Operator [SEL_64] (rows=61 width=276)
                           Output:["_col4","_col6","_col7","_col8","_col9","_col10"]
-                          Filter Operator [FIL_63] (rows=67 width=276)
+                          Filter Operator [FIL_63] (rows=61 width=276)
                             predicate:(_col12 is not null or _col14 is not null)
-                            Merge Join Operator [MERGEJOIN_181] (rows=67 width=276)
+                            Merge Join Operator [MERGEJOIN_181] (rows=61 width=276)
                               Conds:RS_60._col0=RS_217._col0(Left Outer),Output:["_col4","_col6","_col7","_col8","_col9","_col10","_col12","_col14"]
                             <-Reducer 5 [ONE_TO_ONE_EDGE]
                               PARTITION_ONLY_SHUFFLE [RS_60]
                                 PartitionCols:_col0
-                                Merge Join Operator [MERGEJOIN_180] (rows=68 width=276)
+                                Merge Join Operator [MERGEJOIN_180] (rows=62 width=276)
                                   Conds:RS_57._col0=RS_209._col0(Left Outer),Output:["_col0","_col4","_col6","_col7","_col8","_col9","_col10","_col12"]
                                 <-Reducer 4 [ONE_TO_ONE_EDGE]
                                   FORWARD [RS_57]
                                     PartitionCols:_col0
-                                    Merge Join Operator [MERGEJOIN_179] (rows=162346 width=272)
+                                    Merge Join Operator [MERGEJOIN_179] (rows=148065 width=272)
                                       Conds:RS_54._col0=RS_55._col0(Left Semi),Output:["_col0","_col4","_col6","_col7","_col8","_col9","_col10"]
                                     <-Reducer 14 [SIMPLE_EDGE]
                                       SHUFFLE [RS_55]
                                         PartitionCols:_col0
-                                        Group By Operator [GBY_53] (rows=168231 width=2)
+                                        Group By Operator [GBY_53] (rows=153432 width=2)
                                           Output:["_col0"],keys:_col0
                                           Select Operator [SEL_23] (rows=62428523 width=2)
                                             Output:["_col0"]
@@ -263,14 +263,14 @@ Stage-0
                                 <-Reducer 18 [ONE_TO_ONE_EDGE] vectorized
                                   FORWARD [RS_209]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_208] (rows=168231 width=7)
+                                    Select Operator [SEL_208] (rows=168147 width=7)
                                       Output:["_col0","_col1"]
-                                      Group By Operator [GBY_207] (rows=168231 width=3)
+                                      Group By Operator [GBY_207] (rows=168147 width=3)
                                         Output:["_col0"],keys:KEY._col0
                                       <-Reducer 17 [SIMPLE_EDGE]
                                         SHUFFLE [RS_35]
                                           PartitionCols:_col0
-                                          Group By Operator [GBY_34] (rows=168231 width=3)
+                                          Group By Operator [GBY_34] (rows=168147 width=3)
                                             Output:["_col0"],keys:_col1
                                             Merge Join Operator [MERGEJOIN_177] (rows=17104380 width=3)
                                               Conds:RS_206._col0=RS_193._col0(Inner),Output:["_col1"]
@@ -295,20 +295,20 @@ Stage-0
                                                           FORWARD [RS_151]
                                                             Group By Operator [GBY_150] (rows=1 width=12)
                                                               Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                              Select Operator [SEL_149] (rows=162346 width=4)
+                                                              Select Operator [SEL_149] (rows=148065 width=4)
                                                                 Output:["_col0"]
                                                                  Please refer to the previous Merge Join Operator [MERGEJOIN_179]
                             <-Reducer 20 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_217]
                                 PartitionCols:_col0
-                                Select Operator [SEL_216] (rows=167041 width=7)
+                                Select Operator [SEL_216] (rows=165374 width=7)
                                   Output:["_col0","_col1"]
-                                  Group By Operator [GBY_215] (rows=167041 width=3)
+                                  Group By Operator [GBY_215] (rows=165374 width=3)
                                     Output:["_col0"],keys:KEY._col0
                                   <-Reducer 19 [SIMPLE_EDGE]
                                     SHUFFLE [RS_49]
                                       PartitionCols:_col0
-                                      Group By Operator [GBY_48] (rows=167041 width=3)
+                                      Group By Operator [GBY_48] (rows=165374 width=3)
                                         Output:["_col0"],keys:_col1
                                         Merge Join Operator [MERGEJOIN_178] (rows=33642830 width=3)
                                           Conds:RS_214._col0=RS_194._col0(Inner),Output:["_col1"]
@@ -333,7 +333,7 @@ Stage-0
                                                       PARTITION_ONLY_SHUFFLE [RS_166]
                                                         Group By Operator [GBY_165] (rows=1 width=12)
                                                           Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_164] (rows=68 width=4)
+                                                          Select Operator [SEL_164] (rows=62 width=4)
                                                             Output:["_col0"]
                                                              Please refer to the previous Merge Join Operator [MERGEJOIN_180]
 
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query47.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query47.q.out
index fb98cbe..8450bbd 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query47.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query47.q.out
@@ -132,29 +132,29 @@ Stage-0
       File Output Operator [FS_321]
         Limit [LIM_320] (rows=100 width=658)
           Number of rows:100
-          Select Operator [SEL_319] (rows=241454 width=658)
+          Select Operator [SEL_319] (rows=301730 width=658)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 7 [SIMPLE_EDGE]
             SHUFFLE [RS_110]
-              Select Operator [SEL_109] (rows=241454 width=658)
+              Select Operator [SEL_109] (rows=301730 width=658)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                Merge Join Operator [MERGEJOIN_278] (rows=241454 width=546)
+                Merge Join Operator [MERGEJOIN_278] (rows=301730 width=546)
                   Conds:RS_106._col6, _col7, _col8, _col9, _col14=RS_306._col0, _col1, _col2, _col3, _col5(Inner),Output:["_col4","_col6","_col10","_col11","_col12","_col13","_col19"]
                 <-Reducer 6 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_306]
                     PartitionCols:_col0, _col1, _col2, _col3, _col5
-                    Select Operator [SEL_304] (rows=162257387 width=485)
+                    Select Operator [SEL_304] (rows=1810380 width=485)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                      Filter Operator [FIL_302] (rows=162257387 width=489)
+                      Filter Operator [FIL_302] (rows=1810380 width=489)
                         predicate:rank_window_0 is not null
-                        PTF Operator [PTF_300] (rows=162257387 width=489)
+                        PTF Operator [PTF_300] (rows=1810380 width=489)
                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col0 ASC NULLS LAST, _col1 ASC NULLS LAST","partition by:":"_col5, _col4, _col2, _col3"}]
-                          Select Operator [SEL_299] (rows=162257387 width=489)
+                          Select Operator [SEL_299] (rows=1810380 width=489)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                           <-Reducer 5 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_297]
                               PartitionCols:_col5, _col4, _col2, _col3
-                              Group By Operator [GBY_296] (rows=162257387 width=489)
+                              Group By Operator [GBY_296] (rows=1810380 width=489)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                               <-Reducer 4 [SIMPLE_EDGE]
                                 SHUFFLE [RS_93]
@@ -223,41 +223,41 @@ Stage-0
                 <-Reducer 9 [ONE_TO_ONE_EDGE]
                   FORWARD [RS_106]
                     PartitionCols:_col6, _col7, _col8, _col9, _col14
-                    Merge Join Operator [MERGEJOIN_277] (rows=241454 width=717)
+                    Merge Join Operator [MERGEJOIN_277] (rows=301730 width=717)
                       Conds:RS_307._col0, _col1, _col2, _col3, _col5=RS_318._col0, _col1, _col2, _col3, _col8(Inner),Output:["_col4","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
                     <-Reducer 6 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_307]
                         PartitionCols:_col0, _col1, _col2, _col3, _col5
-                        Select Operator [SEL_305] (rows=162257387 width=485)
+                        Select Operator [SEL_305] (rows=1810380 width=485)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                          Filter Operator [FIL_303] (rows=162257387 width=489)
+                          Filter Operator [FIL_303] (rows=1810380 width=489)
                             predicate:rank_window_0 is not null
-                            PTF Operator [PTF_301] (rows=162257387 width=489)
+                            PTF Operator [PTF_301] (rows=1810380 width=489)
                               Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col0 ASC NULLS LAST, _col1 ASC NULLS LAST","partition by:":"_col5, _col4, _col2, _col3"}]
                                Please refer to the previous Select Operator [SEL_299]
                     <-Reducer 11 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_318]
                         PartitionCols:_col0, _col1, _col2, _col3, _col8
-                        Select Operator [SEL_317] (rows=241454 width=605)
+                        Select Operator [SEL_317] (rows=301730 width=605)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
-                          Filter Operator [FIL_316] (rows=241454 width=605)
+                          Filter Operator [FIL_316] (rows=301730 width=605)
                             predicate:CASE WHEN ((_col0 > 0)) THEN (((abs((_col7 - _col0)) / _col0) > 0.1)) ELSE (false) END
-                            Select Operator [SEL_315] (rows=482909 width=601)
+                            Select Operator [SEL_315] (rows=603460 width=601)
                               Output:["rank_window_1","_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                              Filter Operator [FIL_314] (rows=482909 width=601)
+                              Filter Operator [FIL_314] (rows=603460 width=601)
                                 predicate:((_col0 > 0) and rank_window_1 is not null and (_col1 = 2000))
-                                PTF Operator [PTF_313] (rows=162257387 width=601)
+                                PTF Operator [PTF_313] (rows=1810380 width=601)
                                   Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS LAST, _col2 ASC NULLS LAST","partition by:":"_col6, _col5, _col3, _col4"}]
-                                  Select Operator [SEL_312] (rows=162257387 width=601)
+                                  Select Operator [SEL_312] (rows=1810380 width=601)
                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                                   <-Reducer 10 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_311]
                                       PartitionCols:_col5, _col4, _col2, _col3
-                                      Select Operator [SEL_310] (rows=162257387 width=489)
+                                      Select Operator [SEL_310] (rows=1810380 width=489)
                                         Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                        PTF Operator [PTF_309] (rows=162257387 width=489)
+                                        PTF Operator [PTF_309] (rows=1810380 width=489)
                                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col5 ASC NULLS FIRST, _col4 ASC NULLS FIRST, _col2 ASC NULLS FIRST, _col3 ASC NULLS FIRST, _col0 ASC NULLS FIRST","partition by:":"_col5, _col4, _col2, _col3, _col0"}]
-                                          Select Operator [SEL_308] (rows=162257387 width=489)
+                                          Select Operator [SEL_308] (rows=1810380 width=489)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                                           <-Reducer 5 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_298]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query48.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query48.q.out
index 9d3505f..ceba5a4 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query48.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query48.q.out
@@ -162,11 +162,11 @@ Stage-0
           PARTITION_ONLY_SHUFFLE [RS_24]
             Group By Operator [GBY_23] (rows=1 width=8)
               Output:["_col0"],aggregations:["sum(_col3)"]
-              Select Operator [SEL_22] (rows=170127 width=24)
+              Select Operator [SEL_22] (rows=613581 width=24)
                 Output:["_col3"]
-                Filter Operator [FIL_21] (rows=170127 width=24)
+                Filter Operator [FIL_21] (rows=613581 width=24)
                   predicate:((_col10 and _col4) or (_col11 and _col5) or (_col12 and _col6))
-                  Merge Join Operator [MERGEJOIN_73] (rows=226838 width=24)
+                  Merge Join Operator [MERGEJOIN_73] (rows=818111 width=24)
                     Conds:RS_18._col2=RS_90._col0(Inner),Output:["_col3","_col4","_col5","_col6","_col10","_col11","_col12"]
                   <-Map 9 [SIMPLE_EDGE] vectorized
                     SHUFFLE [RS_90]
@@ -180,7 +180,7 @@ Stage-0
                   <-Reducer 3 [SIMPLE_EDGE]
                     SHUFFLE [RS_18]
                       PartitionCols:_col2
-                      Merge Join Operator [MERGEJOIN_72] (rows=2570826 width=12)
+                      Merge Join Operator [MERGEJOIN_72] (rows=9271916 width=13)
                         Conds:RS_15._col1=RS_87._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"]
                       <-Map 8 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_87]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query57.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query57.q.out
index b62de39..a77f2d4 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query57.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query57.q.out
@@ -126,29 +126,29 @@ Stage-0
       File Output Operator [FS_321]
         Limit [LIM_320] (rows=100 width=758)
           Number of rows:100
-          Select Operator [SEL_319] (rows=130121 width=758)
+          Select Operator [SEL_319] (rows=397735 width=758)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
           <-Reducer 7 [SIMPLE_EDGE]
             SHUFFLE [RS_110]
-              Select Operator [SEL_109] (rows=130121 width=758)
+              Select Operator [SEL_109] (rows=397735 width=758)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
-                Merge Join Operator [MERGEJOIN_278] (rows=130121 width=646)
+                Merge Join Operator [MERGEJOIN_278] (rows=397735 width=646)
                   Conds:RS_106._col5, _col6, _col12, _col7=RS_306._col0, _col1, _col4, _col2(Inner),Output:["_col3","_col5","_col6","_col8","_col9","_col10","_col11","_col16"]
                 <-Reducer 6 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_306]
                     PartitionCols:_col0, _col1, _col4, _col2
-                    Select Operator [SEL_304] (rows=87441185 width=404)
+                    Select Operator [SEL_304] (rows=2386410 width=404)
                       Output:["_col0","_col1","_col2","_col3","_col4"]
-                      Filter Operator [FIL_302] (rows=87441185 width=408)
+                      Filter Operator [FIL_302] (rows=2386410 width=408)
                         predicate:rank_window_0 is not null
-                        PTF Operator [PTF_300] (rows=87441185 width=408)
+                        PTF Operator [PTF_300] (rows=2386410 width=408)
                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col0 ASC NULLS LAST, _col1 ASC NULLS LAST","partition by:":"_col4, _col3, _col2"}]
-                          Select Operator [SEL_299] (rows=87441185 width=408)
+                          Select Operator [SEL_299] (rows=2386410 width=408)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                           <-Reducer 5 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_297]
                               PartitionCols:_col4, _col3, _col2
-                              Group By Operator [GBY_296] (rows=87441185 width=408)
+                              Group By Operator [GBY_296] (rows=2386410 width=408)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
                               <-Reducer 4 [SIMPLE_EDGE]
                                 SHUFFLE [RS_93]
@@ -217,41 +217,41 @@ Stage-0
                 <-Reducer 9 [ONE_TO_ONE_EDGE]
                   FORWARD [RS_106]
                     PartitionCols:_col5, _col6, _col12, _col7
-                    Merge Join Operator [MERGEJOIN_277] (rows=130121 width=636)
+                    Merge Join Operator [MERGEJOIN_277] (rows=397735 width=636)
                       Conds:RS_307._col0, _col1, _col4, _col2=RS_318._col0, _col1, _col7, _col2(Inner),Output:["_col3","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
                     <-Reducer 6 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_307]
                         PartitionCols:_col0, _col1, _col4, _col2
-                        Select Operator [SEL_305] (rows=87441185 width=404)
+                        Select Operator [SEL_305] (rows=2386410 width=404)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Filter Operator [FIL_303] (rows=87441185 width=408)
+                          Filter Operator [FIL_303] (rows=2386410 width=408)
                             predicate:rank_window_0 is not null
-                            PTF Operator [PTF_301] (rows=87441185 width=408)
+                            PTF Operator [PTF_301] (rows=2386410 width=408)
                               Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col0 ASC NULLS LAST, _col1 ASC NULLS LAST","partition by:":"_col4, _col3, _col2"}]
                                Please refer to the previous Select Operator [SEL_299]
                     <-Reducer 11 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_318]
                         PartitionCols:_col0, _col1, _col7, _col2
-                        Select Operator [SEL_317] (rows=130121 width=524)
+                        Select Operator [SEL_317] (rows=397735 width=524)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                          Filter Operator [FIL_316] (rows=130121 width=524)
+                          Filter Operator [FIL_316] (rows=397735 width=524)
                             predicate:CASE WHEN ((_col0 > 0)) THEN (((abs((_col6 - _col0)) / _col0) > 0.1)) ELSE (false) END
-                            Select Operator [SEL_315] (rows=260242 width=520)
+                            Select Operator [SEL_315] (rows=795470 width=520)
                               Output:["rank_window_1","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                              Filter Operator [FIL_314] (rows=260242 width=520)
+                              Filter Operator [FIL_314] (rows=795470 width=520)
                                 predicate:((_col0 > 0) and rank_window_1 is not null and (_col1 = 2000))
-                                PTF Operator [PTF_313] (rows=87441185 width=520)
+                                PTF Operator [PTF_313] (rows=2386410 width=520)
                                   Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS LAST, _col2 ASC NULLS LAST","partition by:":"_col5, _col4, _col3"}]
-                                  Select Operator [SEL_312] (rows=87441185 width=520)
+                                  Select Operator [SEL_312] (rows=2386410 width=520)
                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                                   <-Reducer 10 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_311]
                                       PartitionCols:_col4, _col3, _col2
-                                      Select Operator [SEL_310] (rows=87441185 width=408)
+                                      Select Operator [SEL_310] (rows=2386410 width=408)
                                         Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5"]
-                                        PTF Operator [PTF_309] (rows=87441185 width=408)
+                                        PTF Operator [PTF_309] (rows=2386410 width=408)
                                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col4 ASC NULLS FIRST, _col3 ASC NULLS FIRST, _col2 ASC NULLS FIRST, _col0 ASC NULLS FIRST","partition by:":"_col4, _col3, _col2, _col0"}]
-                                          Select Operator [SEL_308] (rows=87441185 width=408)
+                                          Select Operator [SEL_308] (rows=2386410 width=408)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                           <-Reducer 5 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_298]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query59.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query59.q.out
index 805fce4..8214853 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query59.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query59.q.out
@@ -114,20 +114,20 @@ Stage-0
       File Output Operator [FS_207]
         Limit [LIM_206] (rows=100 width=976)
           Number of rows:100
-          Select Operator [SEL_205] (rows=1012347 width=976)
+          Select Operator [SEL_205] (rows=862591 width=976)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
           <-Reducer 6 [SIMPLE_EDGE]
             SHUFFLE [RS_57]
-              Select Operator [SEL_56] (rows=1012347 width=976)
+              Select Operator [SEL_56] (rows=862591 width=976)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
-                Merge Join Operator [MERGEJOIN_181] (rows=1012347 width=1648)
+                Merge Join Operator [MERGEJOIN_181] (rows=862591 width=1648)
                   Conds:RS_53._col11, _col0=RS_54._col1, (_col0 - 52)(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col11","_col12","_col15","_col16","_col17","_col18","_col19","_col20"]
                 <-Reducer 11 [SIMPLE_EDGE]
                   SHUFFLE [RS_54]
                     PartitionCols:_col1, (_col0 - 52)
-                    Select Operator [SEL_46] (rows=28847 width=776)
+                    Select Operator [SEL_46] (rows=26628 width=776)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                      Merge Join Operator [MERGEJOIN_180] (rows=28847 width=776)
+                      Merge Join Operator [MERGEJOIN_180] (rows=26628 width=776)
                         Conds:RS_43._col1=RS_204._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col10"]
                       <-Map 15 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_204]
@@ -139,7 +139,7 @@ Stage-0
                       <-Reducer 10 [SIMPLE_EDGE]
                         SHUFFLE [RS_43]
                           PartitionCols:_col1
-                          Merge Join Operator [MERGEJOIN_179] (rows=28847 width=676)
+                          Merge Join Operator [MERGEJOIN_179] (rows=26628 width=676)
                             Conds:RS_202._col0=RS_198._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                           <-Map 13 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_198]
@@ -153,7 +153,7 @@ Stage-0
                           <-Reducer 9 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_202]
                               PartitionCols:_col0
-                              Group By Operator [GBY_201] (rows=1196832 width=679)
+                              Group By Operator [GBY_201] (rows=1104768 width=679)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)"],keys:KEY._col0, KEY._col1
                               <-Reducer 8 [SIMPLE_EDGE]
                                 SHUFFLE [RS_32]
@@ -185,7 +185,7 @@ Stage-0
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_53]
                     PartitionCols:_col11, _col0
-                    Merge Join Operator [MERGEJOIN_177] (rows=28847 width=976)
+                    Merge Join Operator [MERGEJOIN_177] (rows=26628 width=976)
                       Conds:RS_50._col1=RS_200._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col11","_col12"]
                     <-Map 14 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_200]
@@ -197,7 +197,7 @@ Stage-0
                     <-Reducer 4 [SIMPLE_EDGE]
                       SHUFFLE [RS_50]
                         PartitionCols:_col1
-                        Merge Join Operator [MERGEJOIN_176] (rows=28847 width=788)
+                        Merge Join Operator [MERGEJOIN_176] (rows=26628 width=788)
                           Conds:RS_192._col0=RS_197._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
                         <-Map 13 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_197]
@@ -210,7 +210,7 @@ Stage-0
                         <-Reducer 3 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_192]
                             PartitionCols:_col0
-                            Group By Operator [GBY_191] (rows=1196832 width=791)
+                            Group By Operator [GBY_191] (rows=1104768 width=791)
                               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)"],keys:KEY._col0, KEY._col1
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_12]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query6.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query6.q.out
index a83534e..de17aea 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query6.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query6.q.out
@@ -99,22 +99,22 @@ Stage-0
                     PartitionCols:_col0
                     Group By Operator [GBY_68] (rows=1 width=94)
                       Output:["_col0","_col1"],aggregations:["count()"],keys:_col4
-                      Map Join Operator [MAPJOIN_175] (rows=500 width=86)
+                      Map Join Operator [MAPJOIN_175] (rows=40 width=86)
                         Conds:MAPJOIN_174._col5=RS_220._col0(Inner),HybridGraceHashJoin:true,Output:["_col4"]
                       <-Map 15 [BROADCAST_EDGE] vectorized
                         BROADCAST [RS_220]
                           PartitionCols:_col0
-                          Map Join Operator [MAPJOIN_219] (rows=660 width=4)
+                          Map Join Operator [MAPJOIN_219] (rows=52 width=4)
                             Conds:SEL_218._col1=RS_216._col0(Inner),HybridGraceHashJoin:true,Output:["_col0"]
                           <-Reducer 8 [BROADCAST_EDGE] vectorized
                             BROADCAST [RS_216]
                               PartitionCols:_col0
-                              Group By Operator [GBY_215] (rows=25 width=4)
+                              Group By Operator [GBY_215] (rows=2 width=4)
                                 Output:["_col0"],keys:KEY._col0
                               <-Map 5 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_188]
                                   PartitionCols:_col0
-                                  Group By Operator [GBY_186] (rows=25 width=4)
+                                  Group By Operator [GBY_186] (rows=2 width=4)
                                     Output:["_col0"],keys:d_month_seq
                                     Select Operator [SEL_184] (rows=50 width=12)
                                       Output:["d_month_seq"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query65.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query65.q.out
index a3f63e6..dca20cf 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query65.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query65.q.out
@@ -85,13 +85,13 @@ Stage-0
       File Output Operator [FS_164]
         Limit [LIM_163] (rows=100 width=705)
           Number of rows:100
-          Select Operator [SEL_162] (rows=65392 width=704)
+          Select Operator [SEL_162] (rows=61787 width=703)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
           <-Reducer 6 [SIMPLE_EDGE]
             SHUFFLE [RS_51]
-              Select Operator [SEL_50] (rows=65392 width=704)
+              Select Operator [SEL_50] (rows=61787 width=703)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                Merge Join Operator [MERGEJOIN_137] (rows=65392 width=704)
+                Merge Join Operator [MERGEJOIN_137] (rows=61787 width=703)
                   Conds:RS_47._col1=RS_161._col0(Inner),Output:["_col2","_col6","_col8","_col9","_col10","_col11"]
                 <-Map 12 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_161]
@@ -103,7 +103,7 @@ Stage-0
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_47]
                     PartitionCols:_col1
-                    Merge Join Operator [MERGEJOIN_136] (rows=65392 width=204)
+                    Merge Join Operator [MERGEJOIN_136] (rows=61787 width=204)
                       Conds:RS_44._col0=RS_159._col0(Inner),Output:["_col1","_col2","_col6"]
                     <-Map 11 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_159]
@@ -115,21 +115,21 @@ Stage-0
                     <-Reducer 4 [ONE_TO_ONE_EDGE]
                       FORWARD [RS_44]
                         PartitionCols:_col0
-                        Filter Operator [FIL_43] (rows=65392 width=231)
+                        Filter Operator [FIL_43] (rows=61787 width=231)
                           predicate:(_col2 <= _col4)
-                          Merge Join Operator [MERGEJOIN_135] (rows=196176 width=231)
+                          Merge Join Operator [MERGEJOIN_135] (rows=185361 width=231)
                             Conds:RS_151._col0=RS_157._col0(Inner),Output:["_col0","_col1","_col2","_col4"]
                           <-Reducer 3 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_151]
                               PartitionCols:_col0
-                              Filter Operator [FIL_150] (rows=184637 width=118)
+                              Filter Operator [FIL_150] (rows=173776 width=118)
                                 predicate:_col2 is not null
-                                Group By Operator [GBY_149] (rows=184637 width=118)
+                                Group By Operator [GBY_149] (rows=173776 width=118)
                                   Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_11]
                                     PartitionCols:_col0, _col1
-                                    Group By Operator [GBY_10] (rows=6093021 width=118)
+                                    Group By Operator [GBY_10] (rows=5734608 width=118)
                                       Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col2, _col1
                                       Merge Join Operator [MERGEJOIN_133] (rows=91197860 width=89)
                                         Conds:RS_148._col0=RS_140._col0(Inner),Output:["_col1","_col2","_col3"]
@@ -165,15 +165,15 @@ Stage-0
                           <-Reducer 8 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_157]
                               PartitionCols:_col0
-                              Select Operator [SEL_156] (rows=17 width=115)
+                              Select Operator [SEL_156] (rows=16 width=115)
                                 Output:["_col0","_col1"]
-                                Filter Operator [FIL_155] (rows=17 width=123)
+                                Filter Operator [FIL_155] (rows=16 width=123)
                                   predicate:(_col1 is not null and _col2 is not null)
-                                  Group By Operator [GBY_154] (rows=17 width=123)
+                                  Group By Operator [GBY_154] (rows=16 width=123)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","count(_col2)"],keys:_col1
-                                    Select Operator [SEL_153] (rows=184637 width=118)
+                                    Select Operator [SEL_153] (rows=173776 width=118)
                                       Output:["_col1","_col2"]
-                                      Group By Operator [GBY_152] (rows=184637 width=118)
+                                      Group By Operator [GBY_152] (rows=173776 width=118)
                                         Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                       <-Reducer 2 [SIMPLE_EDGE]
                                         SHUFFLE [RS_27]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query69.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query69.q.out
index 68d2d41..b7cbd87 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query69.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query69.q.out
@@ -164,17 +164,17 @@ Stage-0
                                   Output:["_col0","_col6","_col7","_col8","_col9","_col10"]
                                   Filter Operator [FIL_46] (rows=1 width=367)
                                     predicate:_col12 is null
-                                    Merge Join Operator [MERGEJOIN_182] (rows=33 width=367)
+                                    Merge Join Operator [MERGEJOIN_182] (rows=30 width=367)
                                       Conds:RS_43._col0=RS_212._col0(Left Outer),Output:["_col0","_col6","_col7","_col8","_col9","_col10","_col12"]
                                     <-Reducer 4 [ONE_TO_ONE_EDGE]
                                       FORWARD [RS_43]
                                         PartitionCols:_col0
-                                        Merge Join Operator [MERGEJOIN_181] (rows=6841 width=363)
+                                        Merge Join Operator [MERGEJOIN_181] (rows=6239 width=363)
                                           Conds:RS_40._col0=RS_41._col0(Left Semi),Output:["_col0","_col6","_col7","_col8","_col9","_col10"]
                                         <-Reducer 14 [SIMPLE_EDGE]
                                           SHUFFLE [RS_41]
                                             PartitionCols:_col0
-                                            Group By Operator [GBY_39] (rows=116289 width=1)
+                                            Group By Operator [GBY_39] (rows=106060 width=1)
                                               Output:["_col0"],keys:_col0
                                               Select Operator [SEL_17] (rows=43153353 width=1)
                                                 Output:["_col0"]
@@ -247,14 +247,14 @@ Stage-0
                                     <-Reducer 18 [ONE_TO_ONE_EDGE] vectorized
                                       FORWARD [RS_212]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_211] (rows=116289 width=7)
+                                        Select Operator [SEL_211] (rows=116231 width=7)
                                           Output:["_col0","_col1"]
-                                          Group By Operator [GBY_210] (rows=116289 width=3)
+                                          Group By Operator [GBY_210] (rows=116231 width=3)
                                             Output:["_col0"],keys:KEY._col0
                                           <-Reducer 17 [SIMPLE_EDGE]
                                             SHUFFLE [RS_29]
                                               PartitionCols:_col0
-                                              Group By Operator [GBY_28] (rows=116289 width=3)
+                                              Group By Operator [GBY_28] (rows=116231 width=3)
                                                 Output:["_col0"],keys:_col1
                                                 Merge Join Operator [MERGEJOIN_179] (rows=11823304 width=3)
                                                   Conds:RS_209._col0=RS_196._col0(Inner),Output:["_col1"]
@@ -279,20 +279,20 @@ Stage-0
                                                               FORWARD [RS_152]
                                                                 Group By Operator [GBY_151] (rows=1 width=12)
                                                                   Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                                  Select Operator [SEL_150] (rows=6841 width=4)
+                                                                  Select Operator [SEL_150] (rows=6239 width=4)
                                                                     Output:["_col0"]
                                                                      Please refer to the previous Merge Join Operator [MERGEJOIN_181]
                             <-Reducer 20 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_220]
                                 PartitionCols:_col0
-                                Select Operator [SEL_219] (rows=115467 width=7)
+                                Select Operator [SEL_219] (rows=114314 width=7)
                                   Output:["_col0","_col1"]
-                                  Group By Operator [GBY_218] (rows=115467 width=3)
+                                  Group By Operator [GBY_218] (rows=114314 width=3)
                                     Output:["_col0"],keys:KEY._col0
                                   <-Reducer 19 [SIMPLE_EDGE]
                                     SHUFFLE [RS_59]
                                       PartitionCols:_col0
-                                      Group By Operator [GBY_58] (rows=115467 width=3)
+                                      Group By Operator [GBY_58] (rows=114314 width=3)
                                         Output:["_col0"],keys:_col1
                                         Merge Join Operator [MERGEJOIN_180] (rows=23255411 width=3)
                                           Conds:RS_217._col0=RS_197._col0(Inner),Output:["_col1"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query7.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query7.q.out
index 58ed4cc..ed01a9e 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query7.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query7.q.out
@@ -83,9 +83,9 @@ Stage-0
                     PartitionCols:_col0
                     Group By Operator [GBY_27] (rows=462000 width=476)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"],aggregations:["sum(_col4)","count(_col4)","sum(_col5)","count(_col5)","sum(_col7)","count(_col7)","sum(_col6)","count(_col6)"],keys:_col12
-                      Top N Key Operator [TNK_54] (rows=1441769 width=100)
+                      Top N Key Operator [TNK_54] (rows=1655321 width=100)
                         keys:_col12,sort order:+,top n:100
-                        Merge Join Operator [MERGEJOIN_98] (rows=1441769 width=100)
+                        Merge Join Operator [MERGEJOIN_98] (rows=1655321 width=100)
                           Conds:RS_23._col1=RS_117._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col12"]
                         <-Map 12 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_117]
@@ -97,7 +97,7 @@ Stage-0
                         <-Reducer 4 [SIMPLE_EDGE]
                           SHUFFLE [RS_23]
                             PartitionCols:_col1
-                            Merge Join Operator [MERGEJOIN_97] (rows=1441769 width=4)
+                            Merge Join Operator [MERGEJOIN_97] (rows=1655321 width=4)
                               Conds:RS_20._col3=RS_115._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col7"]
                             <-Map 11 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_115]
@@ -111,7 +111,7 @@ Stage-0
                             <-Reducer 3 [SIMPLE_EDGE]
                               SHUFFLE [RS_20]
                                 PartitionCols:_col3
-                                Merge Join Operator [MERGEJOIN_96] (rows=1441769 width=4)
+                                Merge Join Operator [MERGEJOIN_96] (rows=1655321 width=4)
                                   Conds:RS_17._col0=RS_112._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7"]
                                 <-Map 10 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_112]
@@ -125,7 +125,7 @@ Stage-0
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_17]
                                     PartitionCols:_col0
-                                    Merge Join Operator [MERGEJOIN_95] (rows=4037893 width=4)
+                                    Merge Join Operator [MERGEJOIN_95] (rows=4635977 width=4)
                                       Conds:RS_109._col2=RS_101._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
                                     <-Map 8 [SIMPLE_EDGE] vectorized
                                       PARTITION_ONLY_SHUFFLE [RS_101]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out
index 5d99aa4..145d406 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out
@@ -104,20 +104,20 @@ Stage-0
       File Output Operator [FS_283]
         Limit [LIM_282] (rows=100 width=312)
           Number of rows:100
-          Select Operator [SEL_281] (rows=182953402 width=312)
+          Select Operator [SEL_281] (rows=187595238 width=312)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
           <-Reducer 11 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_280]
-              Group By Operator [GBY_279] (rows=182953402 width=312)
+              Group By Operator [GBY_279] (rows=187595238 width=312)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(VALUE._col0)","count(VALUE._col1)","count(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
               <-Reducer 10 [SIMPLE_EDGE]
                 SHUFFLE [RS_66]
                   PartitionCols:_col0, _col1, _col2
-                  Group By Operator [GBY_65] (rows=182953402 width=312)
+                  Group By Operator [GBY_65] (rows=187595238 width=312)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col3)","count(_col4)","count()"],keys:_col0, _col1, _col2
-                    Select Operator [SEL_63] (rows=471834849 width=292)
+                    Select Operator [SEL_63] (rows=483806094 width=292)
                       Output:["_col0","_col1","_col2","_col3","_col4"]
-                      Merge Join Operator [MERGEJOIN_247] (rows=471834849 width=292)
+                      Merge Join Operator [MERGEJOIN_247] (rows=483806094 width=292)
                         Conds:RS_60._col4, _col6=RS_278._col0, _col1(Left Outer),Output:["_col13","_col15","_col19","_col25"]
                       <-Map 24 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_278]
@@ -129,9 +129,9 @@ Stage-0
                       <-Reducer 9 [SIMPLE_EDGE]
                         SHUFFLE [RS_60]
                           PartitionCols:_col4, _col6
-                          Select Operator [SEL_57] (rows=182953402 width=300)
+                          Select Operator [SEL_57] (rows=187595238 width=300)
                             Output:["_col4","_col6","_col13","_col15","_col19","_col25"]
-                            Merge Join Operator [MERGEJOIN_246] (rows=182953402 width=300)
+                            Merge Join Operator [MERGEJOIN_246] (rows=187595238 width=300)
                               Conds:RS_54._col4=RS_276._col0(Inner),Output:["_col4","_col6","_col13","_col20","_col21","_col25"]
                             <-Map 23 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_276]
@@ -143,9 +143,9 @@ Stage-0
                             <-Reducer 8 [SIMPLE_EDGE]
                               SHUFFLE [RS_54]
                                 PartitionCols:_col4
-                                Filter Operator [FIL_53] (rows=182953402 width=132)
+                                Filter Operator [FIL_53] (rows=187595238 width=132)
                                   predicate:(_col23 > _col14)
-                                  Merge Join Operator [MERGEJOIN_245] (rows=548860207 width=132)
+                                  Merge Join Operator [MERGEJOIN_245] (rows=562785714 width=132)
                                     Conds:RS_50._col1=RS_274._col0(Inner),Output:["_col4","_col6","_col13","_col14","_col20","_col21","_col23"]
                                   <-Map 22 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_274]
@@ -159,7 +159,7 @@ Stage-0
                                   <-Reducer 7 [SIMPLE_EDGE]
                                     SHUFFLE [RS_50]
                                       PartitionCols:_col1
-                                      Merge Join Operator [MERGEJOIN_244] (rows=548860207 width=127)
+                                      Merge Join Operator [MERGEJOIN_244] (rows=562785714 width=127)
                                         Conds:RS_47._col5=RS_271._col0(Left Outer),Output:["_col1","_col4","_col6","_col13","_col14","_col20","_col21"]
                                       <-Map 21 [SIMPLE_EDGE] vectorized
                                         SHUFFLE [RS_271]
@@ -171,7 +171,7 @@ Stage-0
                                       <-Reducer 6 [SIMPLE_EDGE]
                                         SHUFFLE [RS_47]
                                           PartitionCols:_col5
-                                          Merge Join Operator [MERGEJOIN_243] (rows=548860207 width=127)
+                                          Merge Join Operator [MERGEJOIN_243] (rows=562785714 width=127)
                                             Conds:RS_44._col17=RS_269._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col13","_col14","_col20"]
                                           <-Map 20 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_269]
@@ -183,9 +183,9 @@ Stage-0
                                           <-Reducer 5 [SIMPLE_EDGE]
                                             SHUFFLE [RS_44]
                                               PartitionCols:_col17
-                                              Filter Operator [FIL_43] (rows=548860207 width=39)
+                                              Filter Operator [FIL_43] (rows=562785714 width=39)
                                                 predicate:(_col18 < _col7)
-                                                Merge Join Operator [MERGEJOIN_242] (rows=1646580622 width=39)
+                                                Merge Join Operator [MERGEJOIN_242] (rows=1688357142 width=39)
                                                   Conds:RS_40._col10, _col4=RS_267._col0, _col1(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col13","_col14","_col17","_col18"]
                                                 <-Map 19 [SIMPLE_EDGE] vectorized
                                                   SHUFFLE [RS_267]
@@ -199,7 +199,7 @@ Stage-0
                                                 <-Reducer 4 [SIMPLE_EDGE]
                                                   SHUFFLE [RS_40]
                                                     PartitionCols:_col10, _col4
-                                                    Merge Join Operator [MERGEJOIN_241] (rows=2885264 width=30)
+                                                    Merge Join Operator [MERGEJOIN_241] (rows=2958468 width=30)
                                                       Conds:RS_37._col0=RS_38._col2(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col10","_col13","_col14"]
                                                     <-Reducer 16 [SIMPLE_EDGE]
                                                       SHUFFLE [RS_38]
@@ -227,7 +227,7 @@ Stage-0
                                                     <-Reducer 3 [SIMPLE_EDGE]
                                                       SHUFFLE [RS_37]
                                                         PartitionCols:_col0
-                                                        Merge Join Operator [MERGEJOIN_239] (rows=8138146 width=21)
+                                                        Merge Join Operator [MERGEJOIN_239] (rows=8344625 width=21)
                                                           Conds:RS_34._col3=RS_264._col0(Inner),Output:["_col0","_col1","_col4","_col5","_col6","_col7"]
                                                         <-Map 14 [SIMPLE_EDGE] vectorized
                                                           SHUFFLE [RS_264]
@@ -241,7 +241,7 @@ Stage-0
                                                         <-Reducer 2 [SIMPLE_EDGE]
                                                           SHUFFLE [RS_34]
                                                             PartitionCols:_col3
-                                                            Merge Join Operator [MERGEJOIN_238] (rows=40690727 width=27)
+                                                            Merge Join Operator [MERGEJOIN_238] (rows=41723124 width=27)
                                                               Conds:RS_258._col2=RS_261._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
                                                             <-Map 1 [SIMPLE_EDGE] vectorized
                                                               SHUFFLE [RS_258]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query75.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query75.q.out
index 082dd78..5b9f90d 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query75.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query75.q.out
@@ -204,20 +204,20 @@ Stage-0
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
           Limit [LIM_609] (rows=100 width=152)
             Number of rows:100
-            Select Operator [SEL_608] (rows=3422897230256 width=151)
+            Select Operator [SEL_608] (rows=7853634 width=152)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
             <-Reducer 9 [SIMPLE_EDGE]
               SHUFFLE [RS_169]
-                Select Operator [SEL_168] (rows=3422897230256 width=151)
+                Select Operator [SEL_168] (rows=7853634 width=152)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                  Filter Operator [FIL_167] (rows=3422897230256 width=255)
+                  Filter Operator [FIL_167] (rows=7853634 width=256)
                     predicate:((CAST( _col10 AS decimal(17,2)) / CAST( _col4 AS decimal(17,2))) < 0.9)
-                    Merge Join Operator [MERGEJOIN_512] (rows=10268691690770 width=255)
+                    Merge Join Operator [MERGEJOIN_512] (rows=23560904 width=256)
                       Conds:RS_604._col0, _col1, _col2, _col3=RS_607._col0, _col1, _col2, _col3(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col10","_col11"]
                     <-Reducer 27 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_607]
                         PartitionCols:_col0, _col1, _col2, _col3
-                        Group By Operator [GBY_606] (rows=84235776 width=135)
+                        Group By Operator [GBY_606] (rows=40320 width=136)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col4)","sum(_col5)"],keys:_col0, _col1, _col2, _col3
                           Group By Operator [GBY_605] (rows=736356923 width=131)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
@@ -413,7 +413,7 @@ Stage-0
                     <-Reducer 8 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_604]
                         PartitionCols:_col0, _col1, _col2, _col3
-                        Group By Operator [GBY_603] (rows=84235776 width=135)
+                        Group By Operator [GBY_603] (rows=40320 width=136)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col4)","sum(_col5)"],keys:_col0, _col1, _col2, _col3
                           Group By Operator [GBY_602] (rows=736356923 width=131)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query77.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query77.q.out
index ac83e8e..47ffd16 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query77.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query77.q.out
@@ -264,23 +264,23 @@ Stage-0
     Stage-1
       Reducer 7 vectorized
       File Output Operator [FS_271]
-        Limit [LIM_270] (rows=58 width=437)
+        Limit [LIM_270] (rows=66 width=437)
           Number of rows:100
-          Select Operator [SEL_269] (rows=58 width=437)
+          Select Operator [SEL_269] (rows=66 width=437)
             Output:["_col0","_col1","_col2","_col3","_col4"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_268]
-              Select Operator [SEL_267] (rows=58 width=437)
+              Select Operator [SEL_267] (rows=66 width=437)
                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                Group By Operator [GBY_266] (rows=58 width=445)
+                Group By Operator [GBY_266] (rows=66 width=445)
                   Output:["_col0","_col1","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Union 5 [SIMPLE_EDGE]
                   <-Reducer 14 [CONTAINS]
                     Reduce Output Operator [RS_230]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_229] (rows=58 width=445)
+                      Group By Operator [GBY_229] (rows=66 width=445)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Top N Key Operator [TNK_228] (rows=39 width=435)
+                        Top N Key Operator [TNK_228] (rows=60 width=435)
                           keys:_col0, _col1, 0L,sort order:+++,top n:100
                           Select Operator [SEL_226] (rows=2 width=439)
                             Output:["_col0","_col1","_col2","_col3","_col4"]
@@ -352,13 +352,13 @@ Stage-0
                   <-Reducer 20 [CONTAINS]
                     Reduce Output Operator [RS_236]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_235] (rows=58 width=445)
+                      Group By Operator [GBY_235] (rows=66 width=445)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Top N Key Operator [TNK_234] (rows=39 width=435)
+                        Top N Key Operator [TNK_234] (rows=60 width=435)
                           keys:_col0, _col1, 0L,sort order:+++,top n:100
-                          Select Operator [SEL_232] (rows=25 width=435)
+                          Select Operator [SEL_232] (rows=46 width=435)
                             Output:["_col0","_col1","_col2","_col3","_col4"]
-                            Merge Join Operator [MERGEJOIN_231] (rows=25 width=452)
+                            Merge Join Operator [MERGEJOIN_231] (rows=46 width=340)
                               Conds:RS_290._col0=RS_295._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
                             <-Reducer 19 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_290]
@@ -401,12 +401,12 @@ Stage-0
                             <-Reducer 23 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_295]
                                 PartitionCols:_col0
-                                Group By Operator [GBY_294] (rows=24 width=226)
+                                Group By Operator [GBY_294] (rows=22 width=226)
                                   Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
                                 <-Reducer 22 [SIMPLE_EDGE]
                                   SHUFFLE [RS_94]
                                     PartitionCols:_col0
-                                    Group By Operator [GBY_93] (rows=24 width=226)
+                                    Group By Operator [GBY_93] (rows=22 width=226)
                                       Output:["_col0","_col1","_col2"],aggregations:["sum(_col1)","sum(_col2)"],keys:_col0
                                       Select Operator [SEL_91] (rows=1458758 width=135)
                                         Output:["_col0","_col1","_col2"]
@@ -428,9 +428,9 @@ Stage-0
                   <-Reducer 4 [CONTAINS]
                     Reduce Output Operator [RS_224]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_223] (rows=58 width=445)
+                      Group By Operator [GBY_223] (rows=66 width=445)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Top N Key Operator [TNK_222] (rows=39 width=435)
+                        Top N Key Operator [TNK_222] (rows=60 width=435)
                           keys:_col0, _col1, 0L,sort order:+++,top n:100
                           Select Operator [SEL_220] (rows=12 width=436)
                             Output:["_col0","_col1","_col2","_col3","_col4"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query78.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query78.q.out
index 578addd..9bd5f3b 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query78.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query78.q.out
@@ -158,13 +158,13 @@ Stage-0
       File Output Operator [FS_269]
         Limit [LIM_268] (rows=100 width=484)
           Number of rows:100
-          Select Operator [SEL_267] (rows=1831943309558 width=483)
+          Select Operator [SEL_267] (rows=1864495018545 width=483)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
           <-Reducer 5 [SIMPLE_EDGE]
             SHUFFLE [RS_73]
-              Select Operator [SEL_72] (rows=1831943309558 width=719)
+              Select Operator [SEL_72] (rows=1864495018545 width=719)
                 Output:["_col0","_col1","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
-                Merge Join Operator [MERGEJOIN_220] (rows=1831943309558 width=703)
+                Merge Join Operator [MERGEJOIN_220] (rows=1864495018545 width=703)
                   Conds:RS_69._col0, _col1=RS_266._col0, _col1(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col11","_col12","_col13"]
                 <-Reducer 12 [ONE_TO_ONE_EDGE] vectorized
                   FORWARD [RS_266]
@@ -228,7 +228,7 @@ Stage-0
                 <-Reducer 4 [SIMPLE_EDGE]
                   SHUFFLE [RS_69]
                     PartitionCols:_col0, _col1
-                    Merge Join Operator [MERGEJOIN_219] (rows=22841150061 width=471)
+                    Merge Join Operator [MERGEJOIN_219] (rows=23235469441 width=471)
                       Conds:RS_244._col1=RS_256._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8"]
                     <-Reducer 3 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_244]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query81.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query81.q.out
index 8f62fde..ee8f0aa 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query81.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query81.q.out
@@ -88,26 +88,26 @@ Stage-0
     Stage-1
       Reducer 4 vectorized
       File Output Operator [FS_215]
-        Select Operator [SEL_214] (rows=100 width=1506)
+        Select Operator [SEL_214] (rows=100 width=1504)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
-          Limit [LIM_213] (rows=100 width=1420)
+          Limit [LIM_213] (rows=100 width=1418)
             Number of rows:100
-            Select Operator [SEL_212] (rows=1577696 width=1418)
+            Select Operator [SEL_212] (rows=1515166 width=1418)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
             <-Reducer 3 [SIMPLE_EDGE]
               SHUFFLE [RS_66]
-                Select Operator [SEL_65] (rows=1577696 width=1418)
+                Select Operator [SEL_65] (rows=1515166 width=1418)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
-                  Merge Join Operator [MERGEJOIN_181] (rows=1577696 width=1418)
+                  Merge Join Operator [MERGEJOIN_181] (rows=1515166 width=1418)
                     Conds:RS_62._col0=RS_63._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col19"]
                   <-Reducer 10 [SIMPLE_EDGE]
                     SHUFFLE [RS_63]
                       PartitionCols:_col0
-                      Select Operator [SEL_58] (rows=1609248 width=227)
+                      Select Operator [SEL_58] (rows=1545467 width=227)
                         Output:["_col0","_col2"]
-                        Filter Operator [FIL_57] (rows=1609248 width=227)
+                        Filter Operator [FIL_57] (rows=1545467 width=227)
                           predicate:(_col2 > _col3)
-                          Merge Join Operator [MERGEJOIN_180] (rows=4827746 width=227)
+                          Merge Join Operator [MERGEJOIN_180] (rows=4636401 width=227)
                             Conds:RS_205._col1=RS_211._col1(Inner),Output:["_col0","_col2","_col3"]
                           <-Reducer 13 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_211]
@@ -164,11 +164,11 @@ Stage-0
                           <-Reducer 9 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_205]
                               PartitionCols:_col1
-                              Filter Operator [FIL_204] (rows=4827746 width=201)
+                              Filter Operator [FIL_204] (rows=4636401 width=201)
                                 predicate:_col2 is not null
-                                Select Operator [SEL_203] (rows=4827746 width=201)
+                                Select Operator [SEL_203] (rows=4636401 width=201)
                                   Output:["_col0","_col1","_col2"]
-                                  Group By Operator [GBY_202] (rows=4827746 width=201)
+                                  Group By Operator [GBY_202] (rows=4636401 width=201)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                   <-Reducer 8 [SIMPLE_EDGE]
                                     SHUFFLE [RS_23]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query84.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query84.q.out
index d13dfdb..ec1467e 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query84.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query84.q.out
@@ -70,13 +70,13 @@ Stage-0
       File Output Operator [FS_139]
         Limit [LIM_138] (rows=100 width=384)
           Number of rows:100
-          Select Operator [SEL_137] (rows=255280 width=384)
+          Select Operator [SEL_137] (rows=264528 width=384)
             Output:["_col0","_col1"]
           <-Reducer 4 [SIMPLE_EDGE]
             SHUFFLE [RS_35]
-              Select Operator [SEL_34] (rows=255280 width=384)
+              Select Operator [SEL_34] (rows=264528 width=384)
                 Output:["_col1","_col2"]
-                Merge Join Operator [MERGEJOIN_119] (rows=255280 width=284)
+                Merge Join Operator [MERGEJOIN_119] (rows=264528 width=284)
                   Conds:RS_31._col4=RS_32._col0(Inner),Output:["_col2","_col6"]
                 <-Reducer 11 [SIMPLE_EDGE]
                   SHUFFLE [RS_32]
@@ -104,7 +104,7 @@ Stage-0
                 <-Reducer 3 [SIMPLE_EDGE]
                   SHUFFLE [RS_31]
                     PartitionCols:_col4
-                    Merge Join Operator [MERGEJOIN_118] (rows=2552796 width=287)
+                    Merge Join Operator [MERGEJOIN_118] (rows=2645278 width=287)
                       Conds:RS_28._col1=RS_29._col1(Inner),Output:["_col2","_col4","_col6"]
                     <-Reducer 2 [ONE_TO_ONE_EDGE]
                       FORWARD [RS_28]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query89.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query89.q.out
index 6cd97ee..fa314f9 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query89.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query89.q.out
@@ -82,29 +82,29 @@ Stage-0
       File Output Operator [FS_110]
         Limit [LIM_109] (rows=100 width=801)
           Number of rows:100
-          Select Operator [SEL_108] (rows=4804228 width=801)
+          Select Operator [SEL_108] (rows=32461 width=801)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_107]
-              Select Operator [SEL_106] (rows=4804228 width=801)
+              Select Operator [SEL_106] (rows=32461 width=801)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
-                Filter Operator [FIL_105] (rows=4804228 width=689)
+                Filter Operator [FIL_105] (rows=32461 width=689)
                   predicate:CASE WHEN ((avg_window_0 <> 0)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END
-                  Select Operator [SEL_104] (rows=9608456 width=577)
+                  Select Operator [SEL_104] (rows=64922 width=577)
                     Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                    PTF Operator [PTF_103] (rows=9608456 width=577)
+                    PTF Operator [PTF_103] (rows=64922 width=577)
                       Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS FIRST, _col0 ASC NULLS FIRST, _col4 ASC NULLS FIRST, _col5 ASC NULLS FIRST","partition by:":"_col2, _col0, _col4, _col5"}]
-                      Select Operator [SEL_102] (rows=9608456 width=577)
+                      Select Operator [SEL_102] (rows=64922 width=577)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                       <-Reducer 5 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_101]
                           PartitionCols:_col2, _col0, _col4, _col5
-                          Group By Operator [GBY_100] (rows=9608456 width=577)
+                          Group By Operator [GBY_100] (rows=64922 width=577)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                           <-Reducer 4 [SIMPLE_EDGE]
                             SHUFFLE [RS_22]
                               PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
-                              Group By Operator [GBY_21] (rows=27308180 width=577)
+                              Group By Operator [GBY_21] (rows=3375944 width=577)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col3)"],keys:_col5, _col6, _col7, _col9, _col11, _col12
                                 Merge Join Operator [MERGEJOIN_83] (rows=27308180 width=480)
                                   Conds:RS_17._col2=RS_99._col0(Inner),Output:["_col3","_col5","_col6","_col7","_col9","_col11","_col12"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/constraints/query91.q.out b/ql/src/test/results/clientpositive/perf/tez/constraints/query91.q.out
index 5e9c1e0..76a9301 100644
--- a/ql/src/test/results/clientpositive/perf/tez/constraints/query91.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/constraints/query91.q.out
@@ -92,18 +92,18 @@ Stage-0
     Stage-1
       Reducer 8 vectorized
       File Output Operator [FS_170]
-        Select Operator [SEL_169] (rows=115978 width=406)
+        Select Operator [SEL_169] (rows=40890 width=406)
           Output:["_col0","_col1","_col2","_col3"]
         <-Reducer 7 [SIMPLE_EDGE] vectorized
           SHUFFLE [RS_168]
-            Select Operator [SEL_167] (rows=115978 width=518)
+            Select Operator [SEL_167] (rows=40890 width=518)
               Output:["_col0","_col1","_col2","_col4"]
-              Group By Operator [GBY_166] (rows=115978 width=585)
+              Group By Operator [GBY_166] (rows=40890 width=585)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
               <-Reducer 6 [SIMPLE_EDGE]
                 SHUFFLE [RS_41]
                   PartitionCols:_col0, _col1, _col2, _col3, _col4
-                  Group By Operator [GBY_40] (rows=115978 width=585)
+                  Group By Operator [GBY_40] (rows=40890 width=585)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col11)"],keys:_col5, _col6, _col15, _col16, _col17
                     Merge Join Operator [MERGEJOIN_145] (rows=231957 width=473)
                       Conds:RS_36._col10=RS_165._col0(Inner),Output:["_col5","_col6","_col11","_col15","_col16","_col17"]
@@ -159,7 +159,7 @@ Stage-0
                             <-Reducer 3 [SIMPLE_EDGE]
                               SHUFFLE [RS_30]
                                 PartitionCols:_col0
-                                Merge Join Operator [MERGEJOIN_141] (rows=213205 width=183)
+                                Merge Join Operator [MERGEJOIN_141] (rows=228944 width=183)
                                   Conds:RS_27._col3=RS_154._col0(Inner),Output:["_col0","_col2","_col5","_col6"]
                                 <-Map 10 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_154]
@@ -173,7 +173,7 @@ Stage-0
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_27]
                                     PartitionCols:_col3
-                                    Merge Join Operator [MERGEJOIN_140] (rows=1066023 width=187)
+                                    Merge Join Operator [MERGEJOIN_140] (rows=1144719 width=187)
                                       Conds:RS_148._col1=RS_151._col0(Inner),Output:["_col0","_col2","_col3","_col5","_col6"]
                                     <-Map 1 [SIMPLE_EDGE] vectorized
                                       SHUFFLE [RS_148]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query1.q.out b/ql/src/test/results/clientpositive/perf/tez/query1.q.out
index efccffe..9dd2939 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query1.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query1.q.out
@@ -76,28 +76,28 @@ Stage-0
       File Output Operator [FS_165]
         Limit [LIM_164] (rows=100 width=100)
           Number of rows:100
-          Select Operator [SEL_163] (rows=816091 width=100)
+          Select Operator [SEL_163] (rows=663970 width=100)
             Output:["_col0"]
           <-Reducer 4 [SIMPLE_EDGE]
             SHUFFLE [RS_52]
-              Select Operator [SEL_51] (rows=816091 width=100)
+              Select Operator [SEL_51] (rows=663970 width=100)
                 Output:["_col0"]
-                Filter Operator [FIL_50] (rows=816091 width=324)
+                Filter Operator [FIL_50] (rows=663970 width=324)
                   predicate:(_col3 > _col6)
-                  Merge Join Operator [MERGEJOIN_136] (rows=2448274 width=324)
+                  Merge Join Operator [MERGEJOIN_136] (rows=1991910 width=324)
                     Conds:RS_47._col2=RS_162._col1(Inner),Output:["_col3","_col5","_col6"]
                   <-Reducer 10 [SIMPLE_EDGE] vectorized
                     SHUFFLE [RS_162]
                       PartitionCols:_col1
-                      Select Operator [SEL_161] (rows=31 width=115)
+                      Select Operator [SEL_161] (rows=29 width=115)
                         Output:["_col0","_col1"]
-                        Filter Operator [FIL_160] (rows=31 width=123)
+                        Filter Operator [FIL_160] (rows=29 width=123)
                           predicate:(_col1 is not null and _col2 is not null)
-                          Group By Operator [GBY_159] (rows=31 width=123)
+                          Group By Operator [GBY_159] (rows=29 width=123)
                             Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","count(_col2)"],keys:_col1
-                            Select Operator [SEL_158] (rows=14291868 width=119)
+                            Select Operator [SEL_158] (rows=13369812 width=119)
                               Output:["_col1","_col2"]
-                              Group By Operator [GBY_157] (rows=14291868 width=119)
+                              Group By Operator [GBY_157] (rows=13369812 width=119)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                               <-Reducer 9 [SIMPLE_EDGE]
                                 SHUFFLE [RS_32]
@@ -127,7 +127,7 @@ Stage-0
                   <-Reducer 3 [SIMPLE_EDGE]
                     SHUFFLE [RS_47]
                       PartitionCols:_col2
-                      Merge Join Operator [MERGEJOIN_134] (rows=2369298 width=213)
+                      Merge Join Operator [MERGEJOIN_134] (rows=1923224 width=213)
                         Conds:RS_44._col1=RS_156._col0(Inner),Output:["_col2","_col3","_col5"]
                       <-Map 12 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_156]
@@ -141,7 +141,7 @@ Stage-0
                       <-Reducer 2 [SIMPLE_EDGE]
                         SHUFFLE [RS_44]
                           PartitionCols:_col1
-                          Merge Join Operator [MERGEJOIN_133] (rows=2369298 width=114)
+                          Merge Join Operator [MERGEJOIN_133] (rows=1923224 width=114)
                             Conds:RS_139._col0=RS_153._col1(Inner),Output:["_col1","_col2","_col3"]
                           <-Map 1 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_139]
@@ -155,11 +155,11 @@ Stage-0
                           <-Reducer 8 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_153]
                               PartitionCols:_col1
-                              Select Operator [SEL_152] (rows=14291868 width=119)
+                              Select Operator [SEL_152] (rows=11601100 width=119)
                                 Output:["_col0","_col1","_col2"]
-                                Filter Operator [FIL_151] (rows=14291868 width=119)
+                                Filter Operator [FIL_151] (rows=11601100 width=119)
                                   predicate:_col2 is not null
-                                  Group By Operator [GBY_150] (rows=14291868 width=119)
+                                  Group By Operator [GBY_150] (rows=11601100 width=119)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                   <-Reducer 7 [SIMPLE_EDGE]
                                     SHUFFLE [RS_14]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query10.q.out b/ql/src/test/results/clientpositive/perf/tez/query10.q.out
index 6943d08..7c5e00e 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query10.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query10.q.out
@@ -173,28 +173,28 @@ Stage-0
                     PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                     Group By Operator [GBY_66] (rows=1 width=379)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"],aggregations:["count()"],keys:_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13
-                      Top N Key Operator [TNK_103] (rows=58 width=379)
+                      Top N Key Operator [TNK_103] (rows=52 width=379)
                         keys:_col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13,sort order:++++++++,top n:100
-                        Select Operator [SEL_65] (rows=58 width=379)
+                        Select Operator [SEL_65] (rows=52 width=379)
                           Output:["_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                          Filter Operator [FIL_64] (rows=58 width=379)
+                          Filter Operator [FIL_64] (rows=52 width=379)
                             predicate:(_col15 is not null or _col17 is not null)
-                            Merge Join Operator [MERGEJOIN_181] (rows=58 width=379)
+                            Merge Join Operator [MERGEJOIN_181] (rows=52 width=379)
                               Conds:RS_61._col0=RS_219._col0(Left Outer),Output:["_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col15","_col17"]
                             <-Reducer 5 [ONE_TO_ONE_EDGE]
                               PARTITION_ONLY_SHUFFLE [RS_61]
                                 PartitionCols:_col0
-                                Merge Join Operator [MERGEJOIN_180] (rows=58 width=379)
+                                Merge Join Operator [MERGEJOIN_180] (rows=53 width=379)
                                   Conds:RS_58._col0=RS_211._col0(Left Outer),Output:["_col0","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col15"]
                                 <-Reducer 4 [ONE_TO_ONE_EDGE]
                                   FORWARD [RS_58]
                                     PartitionCols:_col0
-                                    Merge Join Operator [MERGEJOIN_179] (rows=22703 width=375)
+                                    Merge Join Operator [MERGEJOIN_179] (rows=20705 width=375)
                                       Conds:RS_55._col0=RS_56._col0(Left Semi),Output:["_col0","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
                                     <-Reducer 14 [SIMPLE_EDGE]
                                       SHUFFLE [RS_56]
                                         PartitionCols:_col0
-                                        Group By Operator [GBY_54] (rows=155827 width=2)
+                                        Group By Operator [GBY_54] (rows=142119 width=2)
                                           Output:["_col0"],keys:_col0
                                           Select Operator [SEL_18] (rows=57825495 width=2)
                                             Output:["_col0"]
@@ -269,14 +269,14 @@ Stage-0
                                 <-Reducer 18 [ONE_TO_ONE_EDGE] vectorized
                                   FORWARD [RS_211]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_210] (rows=155827 width=7)
+                                    Select Operator [SEL_210] (rows=155749 width=7)
                                       Output:["_col0","_col1"]
-                                      Group By Operator [GBY_209] (rows=155827 width=3)
+                                      Group By Operator [GBY_209] (rows=155749 width=3)
                                         Output:["_col0"],keys:KEY._col0
                                       <-Reducer 17 [SIMPLE_EDGE]
                                         SHUFFLE [RS_30]
                                           PartitionCols:_col0
-                                          Group By Operator [GBY_29] (rows=155827 width=3)
+                                          Group By Operator [GBY_29] (rows=155749 width=3)
                                             Output:["_col0"],keys:_col1
                                             Merge Join Operator [MERGEJOIN_177] (rows=15843227 width=3)
                                               Conds:RS_208._col0=RS_195._col0(Inner),Output:["_col1"]
@@ -301,20 +301,20 @@ Stage-0
                                                           FORWARD [RS_151]
                                                             Group By Operator [GBY_150] (rows=1 width=12)
                                                               Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                              Select Operator [SEL_149] (rows=22703 width=4)
+                                                              Select Operator [SEL_149] (rows=20705 width=4)
                                                                 Output:["_col0"]
                                                                  Please refer to the previous Merge Join Operator [MERGEJOIN_179]
                             <-Reducer 20 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_219]
                                 PartitionCols:_col0
-                                Select Operator [SEL_218] (rows=154725 width=7)
+                                Select Operator [SEL_218] (rows=153181 width=7)
                                   Output:["_col0","_col1"]
-                                  Group By Operator [GBY_217] (rows=154725 width=3)
+                                  Group By Operator [GBY_217] (rows=153181 width=3)
                                     Output:["_col0"],keys:KEY._col0
                                   <-Reducer 19 [SIMPLE_EDGE]
                                     SHUFFLE [RS_44]
                                       PartitionCols:_col0
-                                      Group By Operator [GBY_43] (rows=154725 width=3)
+                                      Group By Operator [GBY_43] (rows=153181 width=3)
                                         Output:["_col0"],keys:_col1
                                         Merge Join Operator [MERGEJOIN_178] (rows=31162251 width=3)
                                           Conds:RS_216._col0=RS_196._col0(Inner),Output:["_col1"]
@@ -339,7 +339,7 @@ Stage-0
                                                       PARTITION_ONLY_SHUFFLE [RS_166]
                                                         Group By Operator [GBY_165] (rows=1 width=12)
                                                           Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_164] (rows=58 width=4)
+                                                          Select Operator [SEL_164] (rows=53 width=4)
                                                             Output:["_col0"]
                                                              Please refer to the previous Merge Join Operator [MERGEJOIN_180]
 
diff --git a/ql/src/test/results/clientpositive/perf/tez/query13.q.out b/ql/src/test/results/clientpositive/perf/tez/query13.q.out
index 47fb757..a60c7aa 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query13.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query13.q.out
@@ -138,7 +138,7 @@ Stage-0
             PARTITION_ONLY_SHUFFLE [RS_37]
               Group By Operator [GBY_36] (rows=1 width=256)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col5)","count(_col5)","sum(_col6)","count(_col6)","sum(_col7)","count(_col7)"]
-                Merge Join Operator [MERGEJOIN_121] (rows=368553 width=0)
+                Merge Join Operator [MERGEJOIN_121] (rows=373764 width=0)
                   Conds:RS_32._col4=RS_144._col0(Inner),Output:["_col5","_col6","_col7"]
                 <-Map 13 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_144]
@@ -152,9 +152,9 @@ Stage-0
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_32]
                     PartitionCols:_col4
-                    Filter Operator [FIL_31] (rows=368553 width=44)
+                    Filter Operator [FIL_31] (rows=373764 width=44)
                       predicate:((_col20 and _col21 and _col11 and _col27) or (_col22 and _col23 and _col12 and _col28) or (_col24 and _col25 and _col13 and _col28))
-                      Merge Join Operator [MERGEJOIN_120] (rows=1965626 width=44)
+                      Merge Join Operator [MERGEJOIN_120] (rows=1993417 width=44)
                         Conds:RS_28._col2=RS_141._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col11","_col12","_col13","_col20","_col21","_col22","_col23","_col24","_col25","_col27","_col28"]
                       <-Map 12 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_141]
@@ -168,7 +168,7 @@ Stage-0
                       <-Reducer 4 [SIMPLE_EDGE]
                         SHUFFLE [RS_28]
                           PartitionCols:_col2
-                          Merge Join Operator [MERGEJOIN_119] (rows=10811694 width=36)
+                          Merge Join Operator [MERGEJOIN_119] (rows=10964554 width=39)
                             Conds:RS_25._col1=RS_138._col0(Inner),Output:["_col2","_col4","_col5","_col6","_col7","_col11","_col12","_col13","_col20","_col21","_col22","_col23","_col24","_col25"]
                           <-Map 11 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_138]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query14.q.out b/ql/src/test/results/clientpositive/perf/tez/query14.q.out
index 0222567..a887c50 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query14.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query14.q.out
@@ -387,9 +387,9 @@ Stage-0
                                             <-Reducer 33 [SIMPLE_EDGE]
                                               SHUFFLE [RS_239]
                                                 PartitionCols:_col0
-                                                Group By Operator [GBY_237] (rows=362 width=4)
+                                                Group By Operator [GBY_237] (rows=364 width=4)
                                                   Output:["_col0"],keys:_col0
-                                                  Merge Join Operator [MERGEJOIN_1151] (rows=724 width=4)
+                                                  Merge Join Operator [MERGEJOIN_1151] (rows=729 width=4)
                                                     Conds:RS_1327._col1, _col2, _col3=RS_1355._col0, _col1, _col2(Inner),Output:["_col0"]
                                                   <-Map 24 [SIMPLE_EDGE] vectorized
                                                     SHUFFLE [RS_1327]
@@ -406,20 +406,20 @@ Stage-0
                                                         Output:["_col0","_col1","_col2"]
                                                         Filter Operator [FIL_1353] (rows=1 width=20)
                                                           predicate:(_col3 = 3L)
-                                                          Group By Operator [GBY_1352] (rows=121728 width=19)
+                                                          Group By Operator [GBY_1352] (rows=120960 width=19)
                                                             Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                           <-Union 31 [SIMPLE_EDGE]
                                                             <-Reducer 30 [CONTAINS] vectorized
                                                               Reduce Output Operator [RS_1409]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1408] (rows=121728 width=19)
+                                                                Group By Operator [GBY_1408] (rows=120960 width=19)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1407] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1407] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 26 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_175]
                                                                       PartitionCols:_col0, _col1, _col2
-                                                                      Group By Operator [GBY_28] (rows=121728 width=19)
+                                                                      Group By Operator [GBY_28] (rows=120960 width=19)
                                                                         Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col4, _col5, _col6
                                                                         Merge Join Operator [MERGEJOIN_1134] (rows=14628613 width=11)
                                                                           Conds:RS_24._col1=RS_1323._col0(Inner),Output:["_col4","_col5","_col6"]
@@ -468,14 +468,14 @@ Stage-0
                                                             <-Reducer 40 [CONTAINS] vectorized
                                                               Reduce Output Operator [RS_1423]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1422] (rows=121728 width=19)
+                                                                Group By Operator [GBY_1422] (rows=120960 width=19)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1421] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1421] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 38 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_195]
                                                                       PartitionCols:_col0, _col1, _col2
-                                                                      Group By Operator [GBY_48] (rows=121728 width=19)
+                                                                      Group By Operator [GBY_48] (rows=120960 width=19)
                                                                         Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col4, _col5, _col6
                                                                         Merge Join Operator [MERGEJOIN_1136] (rows=7620440 width=11)
                                                                           Conds:RS_44._col1=RS_1324._col0(Inner),Output:["_col4","_col5","_col6"]
@@ -519,14 +519,14 @@ Stage-0
                                                             <-Reducer 44 [CONTAINS] vectorized
                                                               Reduce Output Operator [RS_1437]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1436] (rows=121728 width=19)
+                                                                Group By Operator [GBY_1436] (rows=120960 width=19)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1435] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1435] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 42 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_216]
                                                                       PartitionCols:_col0, _col1, _col2
-                                                                      Group By Operator [GBY_69] (rows=121728 width=19)
+                                                                      Group By Operator [GBY_69] (rows=120960 width=19)
                                                                         Output:["_col0","_col1","_col2","_col3"],aggregations:["count()"],keys:_col4, _col5, _col6
                                                                         Merge Join Operator [MERGEJOIN_1138] (rows=3828623 width=11)
                                                                           Conds:RS_65._col1=RS_1325._col0(Inner),Output:["_col4","_col5","_col6"]
@@ -761,9 +761,9 @@ Stage-0
                                             <-Reducer 37 [SIMPLE_EDGE]
                                               SHUFFLE [RS_386]
                                                 PartitionCols:_col0
-                                                Group By Operator [GBY_384] (rows=362 width=4)
+                                                Group By Operator [GBY_384] (rows=364 width=4)
                                                   Output:["_col0"],keys:_col0
-                                                  Merge Join Operator [MERGEJOIN_1163] (rows=724 width=4)
+                                                  Merge Join Operator [MERGEJOIN_1163] (rows=729 width=4)
                                                     Conds:RS_1329._col1, _col2, _col3=RS_1371._col0, _col1, _col2(Inner),Output:["_col0"]
                                                   <-Map 24 [SIMPLE_EDGE] vectorized
                                                     SHUFFLE [RS_1329]
@@ -780,15 +780,15 @@ Stage-0
                                                         Output:["_col0","_col1","_col2"]
                                                         Filter Operator [FIL_1369] (rows=1 width=20)
                                                           predicate:(_col3 = 3L)
-                                                          Group By Operator [GBY_1368] (rows=121728 width=19)
+                                                          Group By Operator [GBY_1368] (rows=120960 width=19)
                                                             Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                           <-Union 35 [SIMPLE_EDGE]
                                                             <-Reducer 34 [CONTAINS] vectorized
                                                               Reduce Output Operator [RS_1412]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1411] (rows=121728 width=19)
+                                                                Group By Operator [GBY_1411] (rows=120960 width=19)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1410] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1410] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 26 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_322]
@@ -797,9 +797,9 @@ Stage-0
                                                             <-Reducer 41 [CONTAINS] vectorized
                                                               Reduce Output Operator [RS_1426]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1425] (rows=121728 width=19)
+                                                                Group By Operator [GBY_1425] (rows=120960 width=19)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1424] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1424] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 38 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_342]
@@ -808,9 +808,9 @@ Stage-0
                                                             <-Reducer 45 [CONTAINS] vectorized
                                                               Reduce Output Operator [RS_1440]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1439] (rows=121728 width=19)
+                                                                Group By Operator [GBY_1439] (rows=120960 width=19)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1438] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1438] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 42 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_363]
@@ -910,9 +910,9 @@ Stage-0
                                             <-Reducer 25 [SIMPLE_EDGE]
                                               SHUFFLE [RS_93]
                                                 PartitionCols:_col0
-                                                Group By Operator [GBY_91] (rows=362 width=4)
+                                                Group By Operator [GBY_91] (rows=364 width=4)
                                                   Output:["_col0"],keys:_col0
-                                                  Merge Join Operator [MERGEJOIN_1139] (rows=724 width=4)
+                                                  Merge Join Operator [MERGEJOIN_1139] (rows=729 width=4)
                                                     Conds:RS_1322._col1, _col2, _col3=RS_1333._col0, _col1, _col2(Inner),Output:["_col0"]
                                                   <-Map 24 [SIMPLE_EDGE] vectorized
                                                     SHUFFLE [RS_1322]
@@ -929,15 +929,15 @@ Stage-0
                                                         Output:["_col0","_col1","_col2"]
                                                         Filter Operator [FIL_1331] (rows=1 width=20)
                                                           predicate:(_col3 = 3L)
-                                                          Group By Operator [GBY_1330] (rows=121728 width=19)
+                                                          Group By Operator [GBY_1330] (rows=120960 width=19)
                                                             Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                           <-Union 28 [SIMPLE_EDGE]
                                                             <-Reducer 27 [CONTAINS] vectorized
                                                               Reduce Output Operator [RS_1406]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1405] (rows=121728 width=19)
+                                                                Group By Operator [GBY_1405] (rows=120960 width=19)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1404] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1404] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 26 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_29]
@@ -946,9 +946,9 @@ Stage-0
                                                             <-Reducer 39 [CONTAINS] vectorized
                                                               Reduce Output Operator [RS_1420]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1419] (rows=121728 width=19)
+                                                                Group By Operator [GBY_1419] (rows=120960 width=19)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1418] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1418] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 38 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_49]
@@ -957,9 +957,9 @@ Stage-0
                                                             <-Reducer 43 [CONTAINS] vectorized
                                                               Reduce Output Operator [RS_1434]
                                                                 PartitionCols:_col0, _col1, _col2
-                                                                Group By Operator [GBY_1433] (rows=121728 width=19)
+                                                                Group By Operator [GBY_1433] (rows=120960 width=19)
                                                                   Output:["_col0","_col1","_col2","_col3"],aggregations:["count(_col3)"],keys:_col0, _col1, _col2
-                                                                  Group By Operator [GBY_1432] (rows=121728 width=19)
+                                                                  Group By Operator [GBY_1432] (rows=120960 width=19)
                                                                     Output:["_col0","_col1","_col2","_col3"],aggregations:["count(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2
                                                                   <-Reducer 42 [SIMPLE_EDGE]
                                                                     SHUFFLE [RS_70]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query17.q.out b/ql/src/test/results/clientpositive/perf/tez/query17.q.out
index a89d995..9fca15e 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query17.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query17.q.out
@@ -125,24 +125,24 @@ Stage-0
       File Output Operator [FS_253]
         Limit [LIM_252] (rows=100 width=466)
           Number of rows:100
-          Select Operator [SEL_251] (rows=8581091759 width=466)
+          Select Operator [SEL_251] (rows=9307320243 width=466)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_250]
-              Select Operator [SEL_249] (rows=8581091759 width=466)
+              Select Operator [SEL_249] (rows=9307320243 width=466)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
-                Group By Operator [GBY_248] (rows=8581091759 width=466)
+                Group By Operator [GBY_248] (rows=9307320243 width=466)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["count(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","count(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","count(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_50]
                     PartitionCols:_col0, _col1, _col2
-                    Group By Operator [GBY_49] (rows=8581091759 width=466)
+                    Group By Operator [GBY_49] (rows=9307320243 width=466)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["count(_col3)","sum(_col3)","sum(_col7)","sum(_col6)","count(_col4)","sum(_col4)","sum(_col9)","sum(_col8)","count(_col5)","sum(_col5)","sum(_col11)","sum(_col10)"],keys:_col0, _col1, _col2
-                      Top N Key Operator [TNK_93] (rows=8581091759 width=381)
+                      Top N Key Operator [TNK_93] (rows=9307320243 width=381)
                         keys:_col0, _col1, _col2,sort order:+++,top n:100
-                        Select Operator [SEL_47] (rows=8581091759 width=381)
+                        Select Operator [SEL_47] (rows=9307320243 width=381)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-                          Merge Join Operator [MERGEJOIN_213] (rows=8581091759 width=381)
+                          Merge Join Operator [MERGEJOIN_213] (rows=9307320243 width=381)
                             Conds:RS_44._col3=RS_247._col0(Inner),Output:["_col5","_col8","_col9","_col13","_col19","_col22"]
                           <-Map 17 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_247]
@@ -156,12 +156,12 @@ Stage-0
                           <-Reducer 4 [SIMPLE_EDGE]
                             SHUFFLE [RS_44]
                               PartitionCols:_col3
-                              Merge Join Operator [MERGEJOIN_212] (rows=8581091759 width=299)
+                              Merge Join Operator [MERGEJOIN_212] (rows=9307320243 width=299)
                                 Conds:RS_41._col1, _col2, _col4=RS_42._col6, _col7, _col8(Inner),Output:["_col3","_col5","_col8","_col9","_col13","_col19"]
                               <-Reducer 11 [SIMPLE_EDGE]
                                 SHUFFLE [RS_42]
                                   PartitionCols:_col6, _col7, _col8
-                                  Merge Join Operator [MERGEJOIN_211] (rows=1640229377 width=19)
+                                  Merge Join Operator [MERGEJOIN_211] (rows=1656746576 width=19)
                                     Conds:RS_28._col2, _col1=RS_29._col1, _col2(Inner),Output:["_col3","_col6","_col7","_col8","_col9"]
                                   <-Reducer 10 [SIMPLE_EDGE]
                                     SHUFFLE [RS_28]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query18.q.out b/ql/src/test/results/clientpositive/perf/tez/query18.q.out
index c6d4d1a..5b494ee 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query18.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query18.q.out
@@ -100,27 +100,27 @@ Stage-0
       File Output Operator [FS_174]
         Limit [LIM_173] (rows=100 width=1165)
           Number of rows:100
-          Select Operator [SEL_172] (rows=10969165 width=1165)
+          Select Operator [SEL_172] (rows=11135335 width=1165)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
           <-Reducer 5 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_171]
-              Select Operator [SEL_170] (rows=10969165 width=1165)
+              Select Operator [SEL_170] (rows=11135335 width=1165)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
-                Group By Operator [GBY_169] (rows=10969165 width=1229)
+                Group By Operator [GBY_169] (rows=11135335 width=1229)
                   Output:["_col0","_col1","_col2","_col3","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)","sum(VALUE._col2)","count(VALUE._col3)","sum(VALUE._col4)","count(VALUE._col5)","sum(VALUE._col6)","count(VALUE._col7)","sum(VALUE._col8)","count(VALUE._col9)","sum(VALUE._col10)","count(VALUE._col11)","sum(VALUE._col12)","count(VALUE._col13)"],keys:KEY._col [...]
                 <-Reducer 4 [SIMPLE_EDGE]
                   SHUFFLE [RS_42]
                     PartitionCols:_col0, _col1, _col2, _col3, _col4
-                    Group By Operator [GBY_41] (rows=10969165 width=1229)
+                    Group By Operator [GBY_41] (rows=11135335 width=1229)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"],aggregations:["sum(_col15)","count(_col15)","sum(_col16)","count(_col16)","sum(_col17)","count(_col17)","sum(_col18)","count(_col18)","sum(_col19)","count(_col19)","sum(_col3)","count(_col3)","sum(_col22)","count(_col22)"],keys:_col5, _col6, _col7, _col10, 0L
-                      Merge Join Operator [MERGEJOIN_142] (rows=2193833 width=811)
+                      Merge Join Operator [MERGEJOIN_142] (rows=2227067 width=817)
                         Conds:RS_37._col0=RS_38._col3(Inner),Output:["_col3","_col5","_col6","_col7","_col10","_col15","_col16","_col17","_col18","_col19","_col22"]
                       <-Reducer 12 [SIMPLE_EDGE]
                         SHUFFLE [RS_38]
                           PartitionCols:_col3
-                          Select Operator [SEL_30] (rows=15983636 width=735)
+                          Select Operator [SEL_30] (rows=16225774 width=736)
                             Output:["_col1","_col3","_col6","_col7","_col8","_col9","_col10","_col13"]
-                            Merge Join Operator [MERGEJOIN_141] (rows=15983636 width=735)
+                            Merge Join Operator [MERGEJOIN_141] (rows=16225774 width=736)
                               Conds:RS_27._col3=RS_168._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col8","_col11","_col13"]
                             <-Map 16 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_168]
@@ -134,7 +134,7 @@ Stage-0
                             <-Reducer 11 [SIMPLE_EDGE]
                               SHUFFLE [RS_27]
                                 PartitionCols:_col3
-                                Merge Join Operator [MERGEJOIN_140] (rows=15983636 width=639)
+                                Merge Join Operator [MERGEJOIN_140] (rows=16225774 width=640)
                                   Conds:RS_24._col2=RS_165._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7","_col8","_col11"]
                                 <-Map 15 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_165]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query2.q.out b/ql/src/test/results/clientpositive/perf/tez/query2.q.out
index 2bea1c7..45161a0 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query2.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query2.q.out
@@ -142,13 +142,13 @@ Stage-0
     Stage-1
       Reducer 7 vectorized
       File Output Operator [FS_173]
-        Select Operator [SEL_172] (rows=12881 width=788)
+        Select Operator [SEL_172] (rows=70850 width=788)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
         <-Reducer 6 [SIMPLE_EDGE]
           SHUFFLE [RS_57]
-            Select Operator [SEL_56] (rows=12881 width=788)
+            Select Operator [SEL_56] (rows=70850 width=788)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-              Merge Join Operator [MERGEJOIN_146] (rows=12881 width=1572)
+              Merge Join Operator [MERGEJOIN_146] (rows=70850 width=1572)
                 Conds:RS_53._col0=RS_54.(_col0 - 53)(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col10","_col11","_col12","_col13","_col14","_col15","_col16"]
               <-Reducer 5 [ONE_TO_ONE_EDGE]
                 FORWARD [RS_53]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query23.q.out b/ql/src/test/results/clientpositive/perf/tez/query23.q.out
index 75d7e43..fa9df26 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query23.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query23.q.out
@@ -165,19 +165,19 @@ Stage-0
             Reduce Output Operator [RS_467]
               Group By Operator [GBY_466] (rows=1 width=112)
                 Output:["_col0"],aggregations:["sum(_col0)"]
-                Select Operator [SEL_464] (rows=4 width=112)
+                Select Operator [SEL_464] (rows=3 width=112)
                   Output:["_col0"]
-                  Merge Join Operator [MERGEJOIN_463] (rows=4 width=29)
+                  Merge Join Operator [MERGEJOIN_463] (rows=3 width=38)
                     Conds:RS_178._col2=RS_179._col0(Left Semi),Output:["_col3","_col4"]
                   <-Reducer 11 [SIMPLE_EDGE]
                     PARTITION_ONLY_SHUFFLE [RS_178]
                       PartitionCols:_col2
-                      Merge Join Operator [MERGEJOIN_453] (rows=155 width=0)
+                      Merge Join Operator [MERGEJOIN_453] (rows=148 width=0)
                         Conds:RS_173._col1=RS_503._col0(Inner),Output:["_col2","_col3","_col4"]
                       <-Reducer 18 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_503]
                           PartitionCols:_col0
-                          Group By Operator [GBY_501] (rows=2235 width=4)
+                          Group By Operator [GBY_501] (rows=2134 width=4)
                             Output:["_col0"],keys:_col1
                             Select Operator [SEL_500] (rows=6548799 width=290)
                               Output:["_col1"]
@@ -274,13 +274,13 @@ Stage-0
                   <-Reducer 30 [SIMPLE_EDGE]
                     SHUFFLE [RS_179]
                       PartitionCols:_col0
-                      Group By Operator [GBY_177] (rows=235937 width=4)
+                      Group By Operator [GBY_177] (rows=225322 width=4)
                         Output:["_col0"],keys:_col0
-                        Select Operator [SEL_169] (rows=471875 width=4)
+                        Select Operator [SEL_169] (rows=450644 width=4)
                           Output:["_col0"]
-                          Filter Operator [FIL_168] (rows=471875 width=228)
+                          Filter Operator [FIL_168] (rows=450644 width=228)
                             predicate:(_col1 > _col2)
-                            Merge Join Operator [MERGEJOIN_456] (rows=1415625 width=228)
+                            Merge Join Operator [MERGEJOIN_456] (rows=1351933 width=228)
                               Conds:(Inner),Output:["_col0","_col1","_col2"]
                             <-Reducer 29 [CUSTOM_SIMPLE_EDGE] vectorized
                               PARTITION_ONLY_SHUFFLE [RS_536]
@@ -294,14 +294,14 @@ Stage-0
                                       PARTITION_ONLY_SHUFFLE [RS_531]
                                         Group By Operator [GBY_530] (rows=1 width=112)
                                           Output:["_col0"],aggregations:["max(_col1)"]
-                                          Select Operator [SEL_529] (rows=11859 width=116)
+                                          Select Operator [SEL_529] (rows=10815 width=116)
                                             Output:["_col1"]
-                                            Group By Operator [GBY_528] (rows=11859 width=116)
+                                            Group By Operator [GBY_528] (rows=10815 width=116)
                                               Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                                             <-Reducer 27 [SIMPLE_EDGE]
                                               SHUFFLE [RS_64]
                                                 PartitionCols:_col0
-                                                Group By Operator [GBY_63] (rows=106731 width=116)
+                                                Group By Operator [GBY_63] (rows=97335 width=116)
                                                   Output:["_col0","_col1"],aggregations:["sum(_col2)"],keys:_col4
                                                   Merge Join Operator [MERGEJOIN_445] (rows=18762463 width=116)
                                                     Conds:RS_59._col1=RS_512._col0(Inner),Output:["_col2","_col4"]
@@ -350,9 +350,9 @@ Stage-0
                                                                            Please refer to the previous Select Operator [SEL_518]
                             <-Reducer 32 [CUSTOM_SIMPLE_EDGE] vectorized
                               PARTITION_ONLY_SHUFFLE [RS_551]
-                                Filter Operator [FIL_550] (rows=1415625 width=116)
+                                Filter Operator [FIL_550] (rows=1351933 width=116)
                                   predicate:_col1 is not null
-                                  Group By Operator [GBY_549] (rows=1415625 width=116)
+                                  Group By Operator [GBY_549] (rows=1351933 width=116)
                                     Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                                   <-Reducer 31 [SIMPLE_EDGE]
                                     SHUFFLE [RS_134]
@@ -382,21 +382,21 @@ Stage-0
                                                       PARTITION_ONLY_SHUFFLE [RS_415]
                                                         Group By Operator [GBY_414] (rows=1 width=12)
                                                           Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_413] (rows=155 width=0)
+                                                          Select Operator [SEL_413] (rows=148 width=0)
                                                             Output:["_col0"]
                                                              Please refer to the previous Merge Join Operator [MERGEJOIN_453]
           <-Reducer 4 [CONTAINS]
             Reduce Output Operator [RS_462]
               Group By Operator [GBY_461] (rows=1 width=112)
                 Output:["_col0"],aggregations:["sum(_col0)"]
-                Select Operator [SEL_459] (rows=7 width=112)
+                Select Operator [SEL_459] (rows=6 width=112)
                   Output:["_col0"]
-                  Merge Join Operator [MERGEJOIN_458] (rows=7 width=16)
+                  Merge Join Operator [MERGEJOIN_458] (rows=6 width=19)
                     Conds:RS_87._col1=RS_88._col0(Left Semi),Output:["_col3","_col4"]
                   <-Reducer 3 [SIMPLE_EDGE]
                     PARTITION_ONLY_SHUFFLE [RS_87]
                       PartitionCols:_col1
-                      Merge Join Operator [MERGEJOIN_452] (rows=304 width=0)
+                      Merge Join Operator [MERGEJOIN_452] (rows=290 width=0)
                         Conds:RS_82._col2=RS_502._col0(Inner),Output:["_col1","_col3","_col4"]
                       <-Reducer 18 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_502]
@@ -434,22 +434,22 @@ Stage-0
                   <-Reducer 25 [SIMPLE_EDGE]
                     SHUFFLE [RS_88]
                       PartitionCols:_col0
-                      Group By Operator [GBY_86] (rows=235937 width=4)
+                      Group By Operator [GBY_86] (rows=225322 width=4)
                         Output:["_col0"],keys:_col0
-                        Select Operator [SEL_78] (rows=471875 width=4)
+                        Select Operator [SEL_78] (rows=450644 width=4)
                           Output:["_col0"]
-                          Filter Operator [FIL_77] (rows=471875 width=228)
+                          Filter Operator [FIL_77] (rows=450644 width=228)
                             predicate:(_col1 > _col2)
-                            Merge Join Operator [MERGEJOIN_454] (rows=1415625 width=228)
+                            Merge Join Operator [MERGEJOIN_454] (rows=1351933 width=228)
                               Conds:(Inner),Output:["_col0","_col1","_col2"]
                             <-Reducer 29 [CUSTOM_SIMPLE_EDGE] vectorized
                               PARTITION_ONLY_SHUFFLE [RS_535]
                                  Please refer to the previous Select Operator [SEL_534]
                             <-Reducer 24 [CUSTOM_SIMPLE_EDGE] vectorized
                               PARTITION_ONLY_SHUFFLE [RS_516]
-                                Filter Operator [FIL_515] (rows=1415625 width=116)
+                                Filter Operator [FIL_515] (rows=1351933 width=116)
                                   predicate:_col1 is not null
-                                  Group By Operator [GBY_514] (rows=1415625 width=116)
+                                  Group By Operator [GBY_514] (rows=1351933 width=116)
                                     Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                                   <-Reducer 23 [SIMPLE_EDGE]
                                     SHUFFLE [RS_43]
@@ -479,7 +479,7 @@ Stage-0
                                                       PARTITION_ONLY_SHUFFLE [RS_329]
                                                         Group By Operator [GBY_328] (rows=1 width=12)
                                                           Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_327] (rows=304 width=0)
+                                                          Select Operator [SEL_327] (rows=290 width=0)
                                                             Output:["_col0"]
                                                              Please refer to the previous Merge Join Operator [MERGEJOIN_452]
 
diff --git a/ql/src/test/results/clientpositive/perf/tez/query24.q.out b/ql/src/test/results/clientpositive/perf/tez/query24.q.out
index d4cdb5b..1d29707 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query24.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query24.q.out
@@ -166,7 +166,7 @@ Stage-0
                                 PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
                                 Group By Operator [GBY_82] (rows=576061174 width=932)
                                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"],aggregations:["sum(_col17)"],keys:_col10, _col11, _col1, _col5, _col6, _col19, _col20, _col21, _col22, _col23
-                                  Merge Join Operator [MERGEJOIN_304] (rows=589731269 width=928)
+                                  Merge Join Operator [MERGEJOIN_304] (rows=646603814 width=928)
                                     Conds:RS_78._col13, _col16=RS_332._col0, _col1(Inner),Output:["_col1","_col5","_col6","_col10","_col11","_col17","_col19","_col20","_col21","_col22","_col23"]
                                   <-Map 20 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_332]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query25.q.out b/ql/src/test/results/clientpositive/perf/tez/query25.q.out
index b72cef6..7004eae 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query25.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query25.q.out
@@ -131,20 +131,20 @@ Stage-0
       File Output Operator [FS_253]
         Limit [LIM_252] (rows=100 width=808)
           Number of rows:100
-          Select Operator [SEL_251] (rows=4248052806 width=808)
+          Select Operator [SEL_251] (rows=4607593224 width=808)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_250]
-              Group By Operator [GBY_249] (rows=4248052806 width=808)
+              Group By Operator [GBY_249] (rows=4607593224 width=808)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
               <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_49]
                   PartitionCols:_col0, _col1, _col2, _col3
-                  Group By Operator [GBY_48] (rows=4248052806 width=808)
+                  Group By Operator [GBY_48] (rows=4607593224 width=808)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col5)","sum(_col16)","sum(_col10)"],keys:_col19, _col20, _col22, _col23
-                    Top N Key Operator [TNK_95] (rows=4248052806 width=807)
+                    Top N Key Operator [TNK_95] (rows=4607593224 width=807)
                       keys:_col19, _col20, _col22, _col23,sort order:++++,top n:100
-                      Merge Join Operator [MERGEJOIN_214] (rows=4248052806 width=807)
+                      Merge Join Operator [MERGEJOIN_214] (rows=4607593224 width=807)
                         Conds:RS_44._col3=RS_248._col0(Inner),Output:["_col5","_col10","_col16","_col19","_col20","_col22","_col23"]
                       <-Map 17 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_248]
@@ -158,7 +158,7 @@ Stage-0
                       <-Reducer 4 [SIMPLE_EDGE]
                         SHUFFLE [RS_44]
                           PartitionCols:_col3
-                          Merge Join Operator [MERGEJOIN_213] (rows=4248052806 width=623)
+                          Merge Join Operator [MERGEJOIN_213] (rows=4607593224 width=623)
                             Conds:RS_41._col1=RS_245._col0(Inner),Output:["_col3","_col5","_col10","_col16","_col19","_col20"]
                           <-Map 16 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_245]
@@ -172,12 +172,12 @@ Stage-0
                           <-Reducer 3 [SIMPLE_EDGE]
                             SHUFFLE [RS_41]
                               PartitionCols:_col1
-                              Merge Join Operator [MERGEJOIN_212] (rows=4248052806 width=343)
+                              Merge Join Operator [MERGEJOIN_212] (rows=4607593224 width=343)
                                 Conds:RS_38._col1, _col2, _col4=RS_39._col6, _col7, _col8(Inner),Output:["_col1","_col3","_col5","_col10","_col16"]
                               <-Reducer 11 [SIMPLE_EDGE]
                                 SHUFFLE [RS_39]
                                   PartitionCols:_col6, _col7, _col8
-                                  Merge Join Operator [MERGEJOIN_211] (rows=1893811716 width=235)
+                                  Merge Join Operator [MERGEJOIN_211] (rows=1912891783 width=235)
                                     Conds:RS_25._col2, _col1=RS_26._col1, _col2(Inner),Output:["_col3","_col6","_col7","_col8","_col9"]
                                   <-Reducer 10 [SIMPLE_EDGE]
                                     SHUFFLE [RS_25]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query26.q.out b/ql/src/test/results/clientpositive/perf/tez/query26.q.out
index 798942f..3c5c7a9 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query26.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query26.q.out
@@ -83,9 +83,9 @@ Stage-0
                     PartitionCols:_col0
                     Group By Operator [GBY_28] (rows=462000 width=476)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"],aggregations:["sum(_col4)","count(_col4)","sum(_col5)","count(_col5)","sum(_col7)","count(_col7)","sum(_col6)","count(_col6)"],keys:_col12
-                      Top N Key Operator [TNK_55] (rows=809521 width=100)
+                      Top N Key Operator [TNK_55] (rows=821787 width=100)
                         keys:_col12,sort order:+,top n:100
-                        Merge Join Operator [MERGEJOIN_99] (rows=809521 width=100)
+                        Merge Join Operator [MERGEJOIN_99] (rows=821787 width=100)
                           Conds:RS_24._col2=RS_119._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col12"]
                         <-Map 12 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_119]
@@ -99,7 +99,7 @@ Stage-0
                         <-Reducer 4 [SIMPLE_EDGE]
                           SHUFFLE [RS_24]
                             PartitionCols:_col2
-                            Merge Join Operator [MERGEJOIN_98] (rows=809521 width=4)
+                            Merge Join Operator [MERGEJOIN_98] (rows=821787 width=4)
                               Conds:RS_21._col3=RS_116._col0(Inner),Output:["_col2","_col4","_col5","_col6","_col7"]
                             <-Map 11 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_116]
@@ -113,7 +113,7 @@ Stage-0
                             <-Reducer 3 [SIMPLE_EDGE]
                               SHUFFLE [RS_21]
                                 PartitionCols:_col3
-                                Merge Join Operator [MERGEJOIN_97] (rows=809521 width=4)
+                                Merge Join Operator [MERGEJOIN_97] (rows=821787 width=4)
                                   Conds:RS_18._col0=RS_113._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6","_col7"]
                                 <-Map 10 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_113]
@@ -127,7 +127,7 @@ Stage-0
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_18]
                                     PartitionCols:_col0
-                                    Merge Join Operator [MERGEJOIN_96] (rows=2283326 width=135)
+                                    Merge Join Operator [MERGEJOIN_96] (rows=2317924 width=139)
                                       Conds:RS_110._col1=RS_102._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7"]
                                     <-Map 8 [SIMPLE_EDGE] vectorized
                                       PARTITION_ONLY_SHUFFLE [RS_102]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query27.q.out b/ql/src/test/results/clientpositive/perf/tez/query27.q.out
index 44ddef0..e715634 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query27.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query27.q.out
@@ -74,24 +74,24 @@ Stage-0
       File Output Operator [FS_126]
         Limit [LIM_125] (rows=100 width=538)
           Number of rows:100
-          Select Operator [SEL_124] (rows=4281825 width=538)
+          Select Operator [SEL_124] (rows=4916010 width=538)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_123]
-              Select Operator [SEL_122] (rows=4281825 width=538)
+              Select Operator [SEL_122] (rows=4916010 width=538)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                Group By Operator [GBY_121] (rows=4281825 width=570)
+                Group By Operator [GBY_121] (rows=4916010 width=570)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)","sum(VALUE._col2)","count(VALUE._col3)","sum(VALUE._col4)","count(VALUE._col5)","sum(VALUE._col6)","count(VALUE._col7)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_30]
                     PartitionCols:_col0, _col1, _col2
-                    Group By Operator [GBY_29] (rows=4281825 width=570)
+                    Group By Operator [GBY_29] (rows=4916010 width=570)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"],aggregations:["sum(_col2)","count(_col2)","sum(_col3)","count(_col3)","sum(_col4)","count(_col4)","sum(_col5)","count(_col5)"],keys:_col0, _col1, 0L
-                      Top N Key Operator [TNK_56] (rows=1427275 width=186)
+                      Top N Key Operator [TNK_56] (rows=1638670 width=186)
                         keys:_col0, _col1, 0L,sort order:+++,top n:100
-                        Select Operator [SEL_27] (rows=1427275 width=186)
+                        Select Operator [SEL_27] (rows=1638670 width=186)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                          Merge Join Operator [MERGEJOIN_100] (rows=1427275 width=186)
+                          Merge Join Operator [MERGEJOIN_100] (rows=1638670 width=186)
                             Conds:RS_24._col1=RS_120._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col11","_col13"]
                           <-Map 12 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_120]
@@ -105,7 +105,7 @@ Stage-0
                           <-Reducer 4 [SIMPLE_EDGE]
                             SHUFFLE [RS_24]
                               PartitionCols:_col1
-                              Merge Join Operator [MERGEJOIN_99] (rows=1427275 width=90)
+                              Merge Join Operator [MERGEJOIN_99] (rows=1638670 width=90)
                                 Conds:RS_21._col3=RS_117._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col11"]
                               <-Map 11 [SIMPLE_EDGE] vectorized
                                 SHUFFLE [RS_117]
@@ -119,7 +119,7 @@ Stage-0
                               <-Reducer 3 [SIMPLE_EDGE]
                                 SHUFFLE [RS_21]
                                   PartitionCols:_col3
-                                  Merge Join Operator [MERGEJOIN_98] (rows=1441779 width=4)
+                                  Merge Join Operator [MERGEJOIN_98] (rows=1655322 width=4)
                                     Conds:RS_18._col0=RS_114._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7"]
                                   <-Map 10 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_114]
@@ -133,7 +133,7 @@ Stage-0
                                   <-Reducer 2 [SIMPLE_EDGE]
                                     SHUFFLE [RS_18]
                                       PartitionCols:_col0
-                                      Merge Join Operator [MERGEJOIN_97] (rows=4037920 width=4)
+                                      Merge Join Operator [MERGEJOIN_97] (rows=4635978 width=4)
                                         Conds:RS_111._col2=RS_103._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
                                       <-Map 8 [SIMPLE_EDGE] vectorized
                                         PARTITION_ONLY_SHUFFLE [RS_103]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query29.q.out b/ql/src/test/results/clientpositive/perf/tez/query29.q.out
index f5e6c59..5bffe37 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query29.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query29.q.out
@@ -129,27 +129,27 @@ Stage-0
       File Output Operator [FS_244]
         Limit [LIM_243] (rows=100 width=496)
           Number of rows:100
-          Select Operator [SEL_242] (rows=21091879 width=496)
+          Select Operator [SEL_242] (rows=22648840 width=496)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 4 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_241]
-              Group By Operator [GBY_240] (rows=21091879 width=496)
+              Group By Operator [GBY_240] (rows=22648840 width=496)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3
               <-Reducer 3 [SIMPLE_EDGE]
                 SHUFFLE [RS_49]
                   PartitionCols:_col0, _col1, _col2, _col3
-                  Group By Operator [GBY_48] (rows=21091879 width=496)
+                  Group By Operator [GBY_48] (rows=22648840 width=496)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col13)","sum(_col19)","sum(_col3)"],keys:_col6, _col7, _col22, _col23
-                    Top N Key Operator [TNK_93] (rows=4156223234 width=483)
+                    Top N Key Operator [TNK_93] (rows=4607567401 width=483)
                       keys:_col6, _col7, _col22, _col23,sort order:++++,top n:100
-                      Merge Join Operator [MERGEJOIN_205] (rows=4156223234 width=483)
+                      Merge Join Operator [MERGEJOIN_205] (rows=4607567401 width=483)
                         Conds:RS_44._col2, _col1=RS_45._col11, _col12(Inner),Output:["_col3","_col6","_col7","_col13","_col19","_col22","_col23"]
                       <-Reducer 12 [SIMPLE_EDGE]
                         SHUFFLE [RS_45]
                           PartitionCols:_col11, _col12
-                          Select Operator [SEL_40] (rows=21091879 width=484)
+                          Select Operator [SEL_40] (rows=22648840 width=484)
                             Output:["_col1","_col2","_col8","_col11","_col12","_col14","_col17","_col18"]
-                            Merge Join Operator [MERGEJOIN_204] (rows=21091879 width=484)
+                            Merge Join Operator [MERGEJOIN_204] (rows=22648840 width=484)
                               Conds:RS_37._col3=RS_239._col0(Inner),Output:["_col5","_col8","_col9","_col11","_col14","_col15","_col17","_col18"]
                             <-Map 18 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_239]
@@ -163,7 +163,7 @@ Stage-0
                             <-Reducer 11 [SIMPLE_EDGE]
                               SHUFFLE [RS_37]
                                 PartitionCols:_col3
-                                Merge Join Operator [MERGEJOIN_203] (rows=21091879 width=298)
+                                Merge Join Operator [MERGEJOIN_203] (rows=22648840 width=298)
                                   Conds:RS_34._col1=RS_236._col0(Inner),Output:["_col3","_col5","_col8","_col9","_col11","_col14","_col15"]
                                 <-Map 17 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_236]
@@ -177,7 +177,7 @@ Stage-0
                                 <-Reducer 10 [SIMPLE_EDGE]
                                   SHUFFLE [RS_34]
                                     PartitionCols:_col1
-                                    Merge Join Operator [MERGEJOIN_202] (rows=21091879 width=18)
+                                    Merge Join Operator [MERGEJOIN_202] (rows=22648840 width=18)
                                       Conds:RS_31._col1, _col2, _col4=RS_32._col1, _col2, _col3(Inner),Output:["_col1","_col3","_col5","_col8","_col9","_col11"]
                                     <-Reducer 15 [SIMPLE_EDGE]
                                       SHUFFLE [RS_32]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query30.q.out b/ql/src/test/results/clientpositive/perf/tez/query30.q.out
index 42c0953..e2c814e 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query30.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query30.q.out
@@ -90,13 +90,13 @@ Stage-0
       File Output Operator [FS_215]
         Limit [LIM_214] (rows=100 width=942)
           Number of rows:100
-          Select Operator [SEL_213] (rows=691171 width=942)
+          Select Operator [SEL_213] (rows=601923 width=942)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
           <-Reducer 3 [SIMPLE_EDGE]
             SHUFFLE [RS_66]
-              Select Operator [SEL_65] (rows=691171 width=942)
+              Select Operator [SEL_65] (rows=601923 width=942)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
-                Merge Join Operator [MERGEJOIN_180] (rows=691171 width=942)
+                Merge Join Operator [MERGEJOIN_180] (rows=601923 width=942)
                   Conds:RS_62._col0=RS_63._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col17"]
                 <-Reducer 2 [SIMPLE_EDGE]
                   SHUFFLE [RS_62]
@@ -124,11 +124,11 @@ Stage-0
                 <-Reducer 8 [SIMPLE_EDGE]
                   SHUFFLE [RS_63]
                     PartitionCols:_col0
-                    Select Operator [SEL_58] (rows=704993 width=227)
+                    Select Operator [SEL_58] (rows=613960 width=227)
                       Output:["_col0","_col2"]
-                      Filter Operator [FIL_57] (rows=704993 width=227)
+                      Filter Operator [FIL_57] (rows=613960 width=227)
                         predicate:(_col2 > _col3)
-                        Merge Join Operator [MERGEJOIN_179] (rows=2114980 width=227)
+                        Merge Join Operator [MERGEJOIN_179] (rows=1841880 width=227)
                           Conds:RS_206._col1=RS_212._col1(Inner),Output:["_col0","_col2","_col3"]
                         <-Reducer 10 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_212]
@@ -184,11 +184,11 @@ Stage-0
                         <-Reducer 7 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_206]
                             PartitionCols:_col1
-                            Filter Operator [FIL_205] (rows=2114980 width=201)
+                            Filter Operator [FIL_205] (rows=1841880 width=201)
                               predicate:_col2 is not null
-                              Select Operator [SEL_204] (rows=2114980 width=201)
+                              Select Operator [SEL_204] (rows=1841880 width=201)
                                 Output:["_col0","_col1","_col2"]
-                                Group By Operator [GBY_203] (rows=2114980 width=201)
+                                Group By Operator [GBY_203] (rows=1841880 width=201)
                                   Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                 <-Reducer 6 [SIMPLE_EDGE]
                                   SHUFFLE [RS_23]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query32.q.out b/ql/src/test/results/clientpositive/perf/tez/query32.q.out
index 8d52f5e..0b89356d 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query32.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query32.q.out
@@ -141,16 +141,16 @@ Stage-0
                   <-Reducer 7 [ONE_TO_ONE_EDGE] vectorized
                     FORWARD [RS_125]
                       PartitionCols:_col0
-                      Select Operator [SEL_124] (rows=6951 width=116)
+                      Select Operator [SEL_124] (rows=6917 width=116)
                         Output:["_col0","_col1"]
-                        Filter Operator [FIL_123] (rows=6951 width=124)
+                        Filter Operator [FIL_123] (rows=6917 width=124)
                           predicate:CAST( (1.3 * (_col1 / _col2)) AS decimal(14,7)) is not null
-                          Group By Operator [GBY_122] (rows=6951 width=124)
+                          Group By Operator [GBY_122] (rows=6917 width=124)
                             Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0
                           <-Reducer 6 [SIMPLE_EDGE]
                             SHUFFLE [RS_20]
                               PartitionCols:_col0
-                              Group By Operator [GBY_19] (rows=97314 width=124)
+                              Group By Operator [GBY_19] (rows=96838 width=124)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","count(_col2)"],keys:_col1
                                 Merge Join Operator [MERGEJOIN_102] (rows=31836679 width=110)
                                   Conds:RS_117._col0=RS_121._col0(Inner),Output:["_col1","_col2"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query33.q.out b/ql/src/test/results/clientpositive/perf/tez/query33.q.out
index af1e288..b0f0d86 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query33.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query33.q.out
@@ -192,33 +192,33 @@ Stage-0
     Stage-1
       Reducer 7 vectorized
       File Output Operator [FS_357]
-        Limit [LIM_356] (rows=59 width=115)
+        Limit [LIM_356] (rows=2 width=114)
           Number of rows:100
-          Select Operator [SEL_355] (rows=59 width=115)
+          Select Operator [SEL_355] (rows=2 width=114)
             Output:["_col0","_col1"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_354]
-              Group By Operator [GBY_353] (rows=59 width=115)
+              Group By Operator [GBY_353] (rows=2 width=114)
                 Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
               <-Union 5 [SIMPLE_EDGE]
                 <-Reducer 11 [CONTAINS] vectorized
                   Reduce Output Operator [RS_373]
                     PartitionCols:_col0
-                    Group By Operator [GBY_372] (rows=59 width=115)
+                    Group By Operator [GBY_372] (rows=2 width=114)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_371] (rows=19 width=115)
+                      Group By Operator [GBY_371] (rows=2 width=114)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 10 [SIMPLE_EDGE]
                         SHUFFLE [RS_109]
                           PartitionCols:_col0
-                          Group By Operator [GBY_108] (rows=19 width=115)
+                          Group By Operator [GBY_108] (rows=2 width=114)
                             Output:["_col0","_col1"],aggregations:["sum(_col7)"],keys:_col1
-                            Merge Join Operator [MERGEJOIN_304] (rows=11364 width=3)
+                            Merge Join Operator [MERGEJOIN_304] (rows=1134 width=0)
                               Conds:RS_104._col0=RS_105._col2(Inner),Output:["_col1","_col7"]
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_104]
                                 PartitionCols:_col0
-                                Merge Join Operator [MERGEJOIN_293] (rows=461514 width=7)
+                                Merge Join Operator [MERGEJOIN_293] (rows=46084 width=7)
                                   Conds:RS_319._col1=RS_325._col0(Inner),Output:["_col0","_col1"]
                                 <-Map 1 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_319]
@@ -232,12 +232,12 @@ Stage-0
                                 <-Reducer 13 [ONE_TO_ONE_EDGE] vectorized
                                   FORWARD [RS_325]
                                     PartitionCols:_col0
-                                    Group By Operator [GBY_324] (rows=692 width=3)
+                                    Group By Operator [GBY_324] (rows=69 width=4)
                                       Output:["_col0"],keys:KEY._col0
                                     <-Map 12 [SIMPLE_EDGE] vectorized
                                       SHUFFLE [RS_323]
                                         PartitionCols:_col0
-                                        Group By Operator [GBY_322] (rows=692 width=3)
+                                        Group By Operator [GBY_322] (rows=70 width=4)
                                           Output:["_col0"],keys:i_manufact_id
                                           Select Operator [SEL_321] (rows=46085 width=93)
                                             Output:["i_manufact_id"]
@@ -298,16 +298,16 @@ Stage-0
                 <-Reducer 4 [CONTAINS] vectorized
                   Reduce Output Operator [RS_352]
                     PartitionCols:_col0
-                    Group By Operator [GBY_351] (rows=59 width=115)
+                    Group By Operator [GBY_351] (rows=2 width=114)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_350] (rows=64 width=115)
+                      Group By Operator [GBY_350] (rows=2 width=116)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 3 [SIMPLE_EDGE]
                         SHUFFLE [RS_34]
                           PartitionCols:_col0
-                          Group By Operator [GBY_33] (rows=64 width=115)
+                          Group By Operator [GBY_33] (rows=2 width=116)
                             Output:["_col0","_col1"],aggregations:["sum(_col7)"],keys:_col1
-                            Merge Join Operator [MERGEJOIN_302] (rows=41476 width=3)
+                            Merge Join Operator [MERGEJOIN_302] (rows=4136 width=2)
                               Conds:RS_29._col0=RS_30._col2(Inner),Output:["_col1","_col7"]
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_29]
@@ -356,16 +356,16 @@ Stage-0
                 <-Reducer 9 [CONTAINS] vectorized
                   Reduce Output Operator [RS_365]
                     PartitionCols:_col0
-                    Group By Operator [GBY_364] (rows=59 width=115)
+                    Group By Operator [GBY_364] (rows=2 width=114)
                       Output:["_col0","_col1"],aggregations:["sum(_col1)"],keys:_col0
-                      Group By Operator [GBY_363] (rows=35 width=115)
+                      Group By Operator [GBY_363] (rows=2 width=116)
                         Output:["_col0","_col1"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0
                       <-Reducer 8 [SIMPLE_EDGE]
                         SHUFFLE [RS_71]
                           PartitionCols:_col0
-                          Group By Operator [GBY_70] (rows=35 width=115)
+                          Group By Operator [GBY_70] (rows=2 width=116)
                             Output:["_col0","_col1"],aggregations:["sum(_col7)"],keys:_col1
-                            Merge Join Operator [MERGEJOIN_303] (rows=22352 width=3)
+                            Merge Join Operator [MERGEJOIN_303] (rows=2229 width=1)
                               Conds:RS_66._col0=RS_67._col3(Inner),Output:["_col1","_col7"]
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_66]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query35.q.out b/ql/src/test/results/clientpositive/perf/tez/query35.q.out
index 9c8a4f6..ad92953 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query35.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query35.q.out
@@ -169,28 +169,28 @@ Stage-0
                     PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
                     Group By Operator [GBY_66] (rows=1 width=336)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15"],aggregations:["count()","sum(_col8)","count(_col8)","max(_col8)","sum(_col9)","count(_col9)","max(_col9)","sum(_col10)","count(_col10)","max(_col10)"],keys:_col4, _col6, _col7, _col8, _col9, _col10
-                      Top N Key Operator [TNK_104] (rows=67 width=276)
+                      Top N Key Operator [TNK_104] (rows=61 width=276)
                         keys:_col4, _col6, _col7, _col8, _col9, _col10,sort order:++++++,top n:100
-                        Select Operator [SEL_65] (rows=67 width=276)
+                        Select Operator [SEL_65] (rows=61 width=276)
                           Output:["_col4","_col6","_col7","_col8","_col9","_col10"]
-                          Filter Operator [FIL_64] (rows=67 width=276)
+                          Filter Operator [FIL_64] (rows=61 width=276)
                             predicate:(_col12 is not null or _col14 is not null)
-                            Merge Join Operator [MERGEJOIN_182] (rows=67 width=276)
+                            Merge Join Operator [MERGEJOIN_182] (rows=61 width=276)
                               Conds:RS_61._col0=RS_220._col0(Left Outer),Output:["_col4","_col6","_col7","_col8","_col9","_col10","_col12","_col14"]
                             <-Reducer 5 [ONE_TO_ONE_EDGE]
                               PARTITION_ONLY_SHUFFLE [RS_61]
                                 PartitionCols:_col0
-                                Merge Join Operator [MERGEJOIN_181] (rows=68 width=276)
+                                Merge Join Operator [MERGEJOIN_181] (rows=62 width=276)
                                   Conds:RS_58._col0=RS_212._col0(Left Outer),Output:["_col0","_col4","_col6","_col7","_col8","_col9","_col10","_col12"]
                                 <-Reducer 4 [ONE_TO_ONE_EDGE]
                                   FORWARD [RS_58]
                                     PartitionCols:_col0
-                                    Merge Join Operator [MERGEJOIN_180] (rows=162346 width=272)
+                                    Merge Join Operator [MERGEJOIN_180] (rows=148065 width=272)
                                       Conds:RS_55._col0=RS_56._col0(Left Semi),Output:["_col0","_col4","_col6","_col7","_col8","_col9","_col10"]
                                     <-Reducer 14 [SIMPLE_EDGE]
                                       SHUFFLE [RS_56]
                                         PartitionCols:_col0
-                                        Group By Operator [GBY_54] (rows=168231 width=2)
+                                        Group By Operator [GBY_54] (rows=153432 width=2)
                                           Output:["_col0"],keys:_col0
                                           Select Operator [SEL_18] (rows=62428523 width=2)
                                             Output:["_col0"]
@@ -265,14 +265,14 @@ Stage-0
                                 <-Reducer 18 [ONE_TO_ONE_EDGE] vectorized
                                   FORWARD [RS_212]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_211] (rows=168231 width=7)
+                                    Select Operator [SEL_211] (rows=168147 width=7)
                                       Output:["_col0","_col1"]
-                                      Group By Operator [GBY_210] (rows=168231 width=3)
+                                      Group By Operator [GBY_210] (rows=168147 width=3)
                                         Output:["_col0"],keys:KEY._col0
                                       <-Reducer 17 [SIMPLE_EDGE]
                                         SHUFFLE [RS_30]
                                           PartitionCols:_col0
-                                          Group By Operator [GBY_29] (rows=168231 width=3)
+                                          Group By Operator [GBY_29] (rows=168147 width=3)
                                             Output:["_col0"],keys:_col1
                                             Merge Join Operator [MERGEJOIN_178] (rows=17104380 width=3)
                                               Conds:RS_209._col0=RS_196._col0(Inner),Output:["_col1"]
@@ -297,20 +297,20 @@ Stage-0
                                                           FORWARD [RS_152]
                                                             Group By Operator [GBY_151] (rows=1 width=12)
                                                               Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                              Select Operator [SEL_150] (rows=162346 width=4)
+                                                              Select Operator [SEL_150] (rows=148065 width=4)
                                                                 Output:["_col0"]
                                                                  Please refer to the previous Merge Join Operator [MERGEJOIN_180]
                             <-Reducer 20 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_220]
                                 PartitionCols:_col0
-                                Select Operator [SEL_219] (rows=167041 width=7)
+                                Select Operator [SEL_219] (rows=165374 width=7)
                                   Output:["_col0","_col1"]
-                                  Group By Operator [GBY_218] (rows=167041 width=3)
+                                  Group By Operator [GBY_218] (rows=165374 width=3)
                                     Output:["_col0"],keys:KEY._col0
                                   <-Reducer 19 [SIMPLE_EDGE]
                                     SHUFFLE [RS_44]
                                       PartitionCols:_col0
-                                      Group By Operator [GBY_43] (rows=167041 width=3)
+                                      Group By Operator [GBY_43] (rows=165374 width=3)
                                         Output:["_col0"],keys:_col1
                                         Merge Join Operator [MERGEJOIN_179] (rows=33642830 width=3)
                                           Conds:RS_217._col0=RS_197._col0(Inner),Output:["_col1"]
@@ -335,7 +335,7 @@ Stage-0
                                                       PARTITION_ONLY_SHUFFLE [RS_167]
                                                         Group By Operator [GBY_166] (rows=1 width=12)
                                                           Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                          Select Operator [SEL_165] (rows=68 width=4)
+                                                          Select Operator [SEL_165] (rows=62 width=4)
                                                             Output:["_col0"]
                                                              Please refer to the previous Merge Join Operator [MERGEJOIN_181]
 
diff --git a/ql/src/test/results/clientpositive/perf/tez/query40.q.out b/ql/src/test/results/clientpositive/perf/tez/query40.q.out
index f5aeaf5..8c525b3 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query40.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query40.q.out
@@ -67,11 +67,11 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
 Plan optimized by CBO.
 
 Vertex dependency in root stage
-Map 1 <- Reducer 11 (BROADCAST_EDGE)
-Reducer 11 <- Map 10 (CUSTOM_SIMPLE_EDGE)
+Map 1 <- Reducer 10 (BROADCAST_EDGE)
+Reducer 10 <- Map 9 (CUSTOM_SIMPLE_EDGE)
 Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
 Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
-Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 4 <- Map 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
 Reducer 5 <- Map 12 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
 Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
 Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
@@ -114,13 +114,13 @@ Stage-0
                           SHUFFLE [RS_24]
                             PartitionCols:_col1
                             Merge Join Operator [MERGEJOIN_100] (rows=5757278 width=195)
-                              Conds:RS_21._col2=RS_104._col0(Inner),Output:["_col1","_col4","_col7","_col9","_col10","_col12"]
-                            <-Map 10 [SIMPLE_EDGE] vectorized
-                              SHUFFLE [RS_104]
+                              Conds:RS_21._col2=RS_118._col0(Inner),Output:["_col1","_col4","_col7","_col9","_col10","_col12"]
+                            <-Map 11 [SIMPLE_EDGE] vectorized
+                              SHUFFLE [RS_118]
                                 PartitionCols:_col0
-                                Select Operator [SEL_103] (rows=51333 width=104)
+                                Select Operator [SEL_117] (rows=51333 width=104)
                                   Output:["_col0","_col1"]
-                                  Filter Operator [FIL_102] (rows=51333 width=215)
+                                  Filter Operator [FIL_116] (rows=51333 width=215)
                                     predicate:(i_current_price BETWEEN 0.99 AND 1.49 and i_item_sk is not null)
                                     TableScan [TS_9] (rows=462000 width=215)
                                       default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id","i_current_price"]
@@ -128,13 +128,13 @@ Stage-0
                               SHUFFLE [RS_21]
                                 PartitionCols:_col2
                                 Merge Join Operator [MERGEJOIN_99] (rows=51815831 width=124)
-                                  Conds:RS_18._col0=RS_118._col0(Inner),Output:["_col1","_col2","_col4","_col7","_col9","_col10"]
+                                  Conds:RS_18._col0=RS_104._col0(Inner),Output:["_col1","_col2","_col4","_col7","_col9","_col10"]
                                 <-Map 9 [SIMPLE_EDGE] vectorized
-                                  SHUFFLE [RS_118]
+                                  SHUFFLE [RS_104]
                                     PartitionCols:_col0
-                                    Select Operator [SEL_117] (rows=8116 width=12)
+                                    Select Operator [SEL_103] (rows=8116 width=12)
                                       Output:["_col0","_col1","_col2"]
-                                      Filter Operator [FIL_116] (rows=8116 width=98)
+                                      Filter Operator [FIL_102] (rows=8116 width=98)
                                         predicate:(CAST( d_date AS TIMESTAMP) BETWEEN TIMESTAMP'1998-03-09 00:00:00' AND TIMESTAMP'1998-05-08 00:00:00' and d_date_sk is not null)
                                         TableScan [TS_6] (rows=73049 width=98)
                                           default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date"]
@@ -149,18 +149,18 @@ Stage-0
                                         Select Operator [SEL_111] (rows=285115816 width=127)
                                           Output:["_col0","_col1","_col2","_col3","_col4"]
                                           Filter Operator [FIL_110] (rows=285115816 width=127)
-                                            predicate:(cs_warehouse_sk is not null and cs_sold_date_sk is not null and cs_item_sk is not null and cs_item_sk BETWEEN DynamicValue(RS_22_item_i_item_sk_min) AND DynamicValue(RS_22_item_i_item_sk_max) and in_bloom_filter(cs_item_sk, DynamicValue(RS_22_item_i_item_sk_bloom_filter)))
+                                            predicate:(cs_warehouse_sk is not null and cs_sold_date_sk is not null and cs_item_sk is not null and cs_sold_date_sk BETWEEN DynamicValue(RS_19_date_dim_d_date_sk_min) AND DynamicValue(RS_19_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_19_date_dim_d_date_sk_bloom_filter)))
                                             TableScan [TS_0] (rows=287989836 width=127)
                                               default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_warehouse_sk","cs_item_sk","cs_order_number","cs_sales_price"]
-                                            <-Reducer 11 [BROADCAST_EDGE] vectorized
+                                            <-Reducer 10 [BROADCAST_EDGE] vectorized
                                               BROADCAST [RS_109]
                                                 Group By Operator [GBY_108] (rows=1 width=12)
                                                   Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"]
-                                                <-Map 10 [CUSTOM_SIMPLE_EDGE] vectorized
+                                                <-Map 9 [CUSTOM_SIMPLE_EDGE] vectorized
                                                   SHUFFLE [RS_107]
                                                     Group By Operator [GBY_106] (rows=1 width=12)
                                                       Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                      Select Operator [SEL_105] (rows=51333 width=4)
+                                                      Select Operator [SEL_105] (rows=8116 width=4)
                                                         Output:["_col0"]
                                                          Please refer to the previous Select Operator [SEL_103]
                                     <-Map 8 [SIMPLE_EDGE] vectorized
diff --git a/ql/src/test/results/clientpositive/perf/tez/query47.q.out b/ql/src/test/results/clientpositive/perf/tez/query47.q.out
index 68f7bb6..1c81d1e 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query47.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query47.q.out
@@ -132,29 +132,29 @@ Stage-0
       File Output Operator [FS_321]
         Limit [LIM_320] (rows=100 width=658)
           Number of rows:100
-          Select Operator [SEL_319] (rows=241454 width=658)
+          Select Operator [SEL_319] (rows=301730 width=658)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
           <-Reducer 7 [SIMPLE_EDGE]
             SHUFFLE [RS_110]
-              Select Operator [SEL_109] (rows=241454 width=658)
+              Select Operator [SEL_109] (rows=301730 width=658)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                Merge Join Operator [MERGEJOIN_278] (rows=241454 width=546)
+                Merge Join Operator [MERGEJOIN_278] (rows=301730 width=546)
                   Conds:RS_106._col6, _col7, _col8, _col9, _col14=RS_306._col0, _col1, _col2, _col3, _col5(Inner),Output:["_col4","_col6","_col10","_col11","_col12","_col13","_col19"]
                 <-Reducer 6 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_306]
                     PartitionCols:_col0, _col1, _col2, _col3, _col5
-                    Select Operator [SEL_304] (rows=162257387 width=485)
+                    Select Operator [SEL_304] (rows=1810380 width=485)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                      Filter Operator [FIL_302] (rows=162257387 width=489)
+                      Filter Operator [FIL_302] (rows=1810380 width=489)
                         predicate:rank_window_0 is not null
-                        PTF Operator [PTF_300] (rows=162257387 width=489)
+                        PTF Operator [PTF_300] (rows=1810380 width=489)
                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS LAST, _col3 ASC NULLS LAST","partition by:":"_col1, _col0, _col4, _col5"}]
-                          Select Operator [SEL_299] (rows=162257387 width=489)
+                          Select Operator [SEL_299] (rows=1810380 width=489)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                           <-Reducer 5 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_297]
                               PartitionCols:_col1, _col0, _col4, _col5
-                              Group By Operator [GBY_296] (rows=162257387 width=489)
+                              Group By Operator [GBY_296] (rows=1810380 width=489)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                               <-Reducer 4 [SIMPLE_EDGE]
                                 SHUFFLE [RS_93]
@@ -223,41 +223,41 @@ Stage-0
                 <-Reducer 9 [ONE_TO_ONE_EDGE]
                   FORWARD [RS_106]
                     PartitionCols:_col6, _col7, _col8, _col9, _col14
-                    Merge Join Operator [MERGEJOIN_277] (rows=241454 width=717)
+                    Merge Join Operator [MERGEJOIN_277] (rows=301730 width=717)
                       Conds:RS_307._col0, _col1, _col2, _col3, _col5=RS_318._col0, _col1, _col2, _col3, _col8(Inner),Output:["_col4","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
                     <-Reducer 6 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_307]
                         PartitionCols:_col0, _col1, _col2, _col3, _col5
-                        Select Operator [SEL_305] (rows=162257387 width=485)
+                        Select Operator [SEL_305] (rows=1810380 width=485)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                          Filter Operator [FIL_303] (rows=162257387 width=489)
+                          Filter Operator [FIL_303] (rows=1810380 width=489)
                             predicate:rank_window_0 is not null
-                            PTF Operator [PTF_301] (rows=162257387 width=489)
+                            PTF Operator [PTF_301] (rows=1810380 width=489)
                               Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS LAST, _col3 ASC NULLS LAST","partition by:":"_col1, _col0, _col4, _col5"}]
                                Please refer to the previous Select Operator [SEL_299]
                     <-Reducer 11 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_318]
                         PartitionCols:_col0, _col1, _col2, _col3, _col8
-                        Select Operator [SEL_317] (rows=241454 width=605)
+                        Select Operator [SEL_317] (rows=301730 width=605)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
-                          Filter Operator [FIL_316] (rows=241454 width=605)
+                          Filter Operator [FIL_316] (rows=301730 width=605)
                             predicate:CASE WHEN ((_col0 > 0)) THEN (((abs((_col7 - _col0)) / _col0) > 0.1)) ELSE (false) END
-                            Select Operator [SEL_315] (rows=482909 width=601)
+                            Select Operator [SEL_315] (rows=603460 width=601)
                               Output:["rank_window_1","_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                              Filter Operator [FIL_314] (rows=482909 width=601)
+                              Filter Operator [FIL_314] (rows=603460 width=601)
                                 predicate:((_col0 > 0) and rank_window_1 is not null and (_col3 = 2000))
-                                PTF Operator [PTF_313] (rows=162257387 width=601)
+                                PTF Operator [PTF_313] (rows=1810380 width=601)
                                   Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col3 ASC NULLS LAST, _col4 ASC NULLS LAST","partition by:":"_col2, _col1, _col5, _col6"}]
-                                  Select Operator [SEL_312] (rows=162257387 width=601)
+                                  Select Operator [SEL_312] (rows=1810380 width=601)
                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                                   <-Reducer 10 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_311]
                                       PartitionCols:_col1, _col0, _col4, _col5
-                                      Select Operator [SEL_310] (rows=162257387 width=489)
+                                      Select Operator [SEL_310] (rows=1810380 width=489)
                                         Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                                        PTF Operator [PTF_309] (rows=162257387 width=489)
+                                        PTF Operator [PTF_309] (rows=1810380 width=489)
                                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST, _col0 ASC NULLS FIRST, _col4 ASC NULLS FIRST, _col5 ASC NULLS FIRST, _col2 ASC NULLS FIRST","partition by:":"_col1, _col0, _col4, _col5, _col2"}]
-                                          Select Operator [SEL_308] (rows=162257387 width=489)
+                                          Select Operator [SEL_308] (rows=1810380 width=489)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                                           <-Reducer 5 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_298]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query48.q.out b/ql/src/test/results/clientpositive/perf/tez/query48.q.out
index c232f17..a44ffda 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query48.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query48.q.out
@@ -163,7 +163,7 @@ Stage-0
           PARTITION_ONLY_SHUFFLE [RS_30]
             Group By Operator [GBY_29] (rows=1 width=8)
               Output:["_col0"],aggregations:["sum(_col4)"]
-              Merge Join Operator [MERGEJOIN_96] (rows=170127 width=0)
+              Merge Join Operator [MERGEJOIN_96] (rows=613581 width=0)
                 Conds:RS_25._col3=RS_116._col0(Inner),Output:["_col4"]
               <-Map 11 [SIMPLE_EDGE] vectorized
                 SHUFFLE [RS_116]
@@ -177,9 +177,9 @@ Stage-0
               <-Reducer 4 [SIMPLE_EDGE]
                 SHUFFLE [RS_25]
                   PartitionCols:_col3
-                  Filter Operator [FIL_24] (rows=170127 width=24)
+                  Filter Operator [FIL_24] (rows=613581 width=24)
                     predicate:((_col11 and _col5) or (_col12 and _col6) or (_col13 and _col7))
-                    Merge Join Operator [MERGEJOIN_95] (rows=226838 width=24)
+                    Merge Join Operator [MERGEJOIN_95] (rows=818111 width=24)
                       Conds:RS_21._col2=RS_113._col0(Inner),Output:["_col3","_col4","_col5","_col6","_col7","_col11","_col12","_col13"]
                     <-Map 10 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_113]
@@ -193,7 +193,7 @@ Stage-0
                     <-Reducer 3 [SIMPLE_EDGE]
                       SHUFFLE [RS_21]
                         PartitionCols:_col2
-                        Merge Join Operator [MERGEJOIN_94] (rows=2570826 width=12)
+                        Merge Join Operator [MERGEJOIN_94] (rows=9271916 width=14)
                           Conds:RS_18._col1=RS_110._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6","_col7"]
                         <-Map 9 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_110]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query49.q.out b/ql/src/test/results/clientpositive/perf/tez/query49.q.out
index 18ac806..24db51e 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query49.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query49.q.out
@@ -302,50 +302,50 @@ Stage-0
       File Output Operator [FS_307]
         Limit [LIM_306] (rows=100 width=215)
           Number of rows:100
-          Select Operator [SEL_305] (rows=3418 width=215)
+          Select Operator [SEL_305] (rows=372 width=215)
             Output:["_col0","_col1","_col2","_col3","_col4"]
           <-Reducer 10 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_304]
-              Select Operator [SEL_303] (rows=3418 width=215)
+              Select Operator [SEL_303] (rows=372 width=215)
                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                Group By Operator [GBY_302] (rows=3418 width=215)
+                Group By Operator [GBY_302] (rows=372 width=215)
                   Output:["_col0","_col1","_col2","_col3","_col4"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
                 <-Union 9 [SIMPLE_EDGE]
                   <-Reducer 24 [CONTAINS] vectorized
                     Reduce Output Operator [RS_348]
                       PartitionCols:_col0, _col1, _col2, _col3, _col4
-                      Group By Operator [GBY_347] (rows=3418 width=215)
+                      Group By Operator [GBY_347] (rows=372 width=215)
                         Output:["_col0","_col1","_col2","_col3","_col4"],keys:_col0, _col3, _col4, _col1, _col2
-                        Top N Key Operator [TNK_346] (rows=3418 width=214)
+                        Top N Key Operator [TNK_346] (rows=372 width=214)
                           keys:_col0, _col3, _col4, _col1, _col2,sort order:+++++,top n:100
-                          Select Operator [SEL_345] (rows=1142 width=213)
+                          Select Operator [SEL_345] (rows=120 width=213)
                             Output:["_col0","_col1","_col2","_col3","_col4"]
-                            Filter Operator [FIL_344] (rows=1142 width=248)
+                            Filter Operator [FIL_344] (rows=120 width=248)
                               predicate:((_col0 <= 10) or (rank_window_1 <= 10))
-                              PTF Operator [PTF_343] (rows=1714 width=248)
+                              PTF Operator [PTF_343] (rows=182 width=248)
                                 Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col4 AS decimal(15,4)) / CAST( _col5 AS decimal(15,4))) ASC NULLS LAST","partition by:":"0"}]
-                                Select Operator [SEL_342] (rows=1714 width=248)
+                                Select Operator [SEL_342] (rows=182 width=248)
                                   Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                 <-Reducer 23 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_341]
                                     PartitionCols:0
-                                    Select Operator [SEL_340] (rows=1714 width=244)
+                                    Select Operator [SEL_340] (rows=182 width=244)
                                       Output:["rank_window_0","_col0","_col1","_col2","_col3","_col4"]
-                                      PTF Operator [PTF_339] (rows=1714 width=244)
+                                      PTF Operator [PTF_339] (rows=182 width=244)
                                         Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col1 AS decimal(15,4)) / CAST( _col2 AS decimal(15,4))) ASC NULLS LAST","partition by:":"0"}]
-                                        Select Operator [SEL_338] (rows=1714 width=244)
+                                        Select Operator [SEL_338] (rows=182 width=244)
                                           Output:["_col0","_col1","_col2","_col3","_col4"]
                                         <-Reducer 22 [SIMPLE_EDGE] vectorized
                                           SHUFFLE [RS_337]
                                             PartitionCols:0
-                                            Group By Operator [GBY_336] (rows=1714 width=244)
+                                            Group By Operator [GBY_336] (rows=182 width=244)
                                               Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
                                             <-Reducer 21 [SIMPLE_EDGE]
                                               SHUFFLE [RS_86]
                                                 PartitionCols:_col0
-                                                Group By Operator [GBY_85] (rows=3428 width=244)
+                                                Group By Operator [GBY_85] (rows=546 width=244)
                                                   Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col8)","sum(_col3)","sum(_col9)","sum(_col4)"],keys:_col1
-                                                  Merge Join Operator [MERGEJOIN_234] (rows=1673571 width=236)
+                                                  Merge Join Operator [MERGEJOIN_234] (rows=2759229 width=236)
                                                     Conds:RS_81._col1, _col2=RS_335._col0, _col1(Inner),Output:["_col1","_col3","_col4","_col8","_col9"]
                                                   <-Map 30 [SIMPLE_EDGE] vectorized
                                                     SHUFFLE [RS_335]
@@ -393,48 +393,48 @@ Stage-0
                   <-Reducer 8 [CONTAINS] vectorized
                     Reduce Output Operator [RS_301]
                       PartitionCols:_col0, _col1, _col2, _col3, _col4
-                      Group By Operator [GBY_300] (rows=3418 width=215)
+                      Group By Operator [GBY_300] (rows=372 width=215)
                         Output:["_col0","_col1","_col2","_col3","_col4"],keys:_col0, _col3, _col4, _col1, _col2
-                        Top N Key Operator [TNK_299] (rows=3418 width=214)
+                        Top N Key Operator [TNK_299] (rows=372 width=214)
                           keys:_col0, _col3, _col4, _col1, _col2,sort order:+++++,top n:100
-                          Select Operator [SEL_298] (rows=2276 width=215)
+                          Select Operator [SEL_298] (rows=252 width=215)
                             Output:["_col0","_col1","_col2","_col3","_col4"]
-                            Group By Operator [GBY_297] (rows=2276 width=215)
+                            Group By Operator [GBY_297] (rows=252 width=215)
                               Output:["_col0","_col1","_col2","_col3","_col4"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
                             <-Union 7 [SIMPLE_EDGE]
                               <-Reducer 18 [CONTAINS] vectorized
                                 Reduce Output Operator [RS_327]
                                   PartitionCols:_col0, _col1, _col2, _col3, _col4
-                                  Group By Operator [GBY_326] (rows=2276 width=215)
+                                  Group By Operator [GBY_326] (rows=252 width=215)
                                     Output:["_col0","_col1","_col2","_col3","_col4"],keys:_col0, _col3, _col4, _col1, _col2
-                                    Select Operator [SEL_325] (rows=1134 width=215)
+                                    Select Operator [SEL_325] (rows=126 width=215)
                                       Output:["_col0","_col1","_col2","_col3","_col4"]
-                                      Filter Operator [FIL_324] (rows=1134 width=248)
+                                      Filter Operator [FIL_324] (rows=126 width=248)
                                         predicate:((_col0 <= 10) or (rank_window_1 <= 10))
-                                        PTF Operator [PTF_323] (rows=1701 width=248)
+                                        PTF Operator [PTF_323] (rows=189 width=248)
                                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col4 AS decimal(15,4)) / CAST( _col5 AS decimal(15,4))) ASC NULLS LAST","partition by:":"0"}]
-                                          Select Operator [SEL_322] (rows=1701 width=248)
+                                          Select Operator [SEL_322] (rows=189 width=248)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                           <-Reducer 17 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_321]
                                               PartitionCols:0
-                                              Select Operator [SEL_320] (rows=1701 width=244)
+                                              Select Operator [SEL_320] (rows=189 width=244)
                                                 Output:["rank_window_0","_col0","_col1","_col2","_col3","_col4"]
-                                                PTF Operator [PTF_319] (rows=1701 width=244)
+                                                PTF Operator [PTF_319] (rows=189 width=244)
                                                   Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col1 AS decimal(15,4)) / CAST( _col2 AS decimal(15,4))) ASC NULLS LAST","partition by:":"0"}]
-                                                  Select Operator [SEL_318] (rows=1701 width=244)
+                                                  Select Operator [SEL_318] (rows=189 width=244)
                                                     Output:["_col0","_col1","_col2","_col3","_col4"]
                                                   <-Reducer 16 [SIMPLE_EDGE] vectorized
                                                     SHUFFLE [RS_317]
                                                       PartitionCols:0
-                                                      Group By Operator [GBY_316] (rows=1701 width=244)
+                                                      Group By Operator [GBY_316] (rows=189 width=244)
                                                         Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
                                                       <-Reducer 15 [SIMPLE_EDGE]
                                                         SHUFFLE [RS_48]
                                                           PartitionCols:_col0
-                                                          Group By Operator [GBY_47] (rows=1701 width=244)
+                                                          Group By Operator [GBY_47] (rows=378 width=244)
                                                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col8)","sum(_col3)","sum(_col9)","sum(_col4)"],keys:_col1
-                                                            Merge Join Operator [MERGEJOIN_232] (rows=865646 width=236)
+                                                            Merge Join Operator [MERGEJOIN_232] (rows=1366845 width=236)
                                                               Conds:RS_43._col1, _col2=RS_315._col0, _col1(Inner),Output:["_col1","_col3","_col4","_col8","_col9"]
                                                             <-Map 28 [SIMPLE_EDGE] vectorized
                                                               SHUFFLE [RS_315]
@@ -477,36 +477,36 @@ Stage-0
                               <-Reducer 6 [CONTAINS] vectorized
                                 Reduce Output Operator [RS_296]
                                   PartitionCols:_col0, _col1, _col2, _col3, _col4
-                                  Group By Operator [GBY_295] (rows=2276 width=215)
+                                  Group By Operator [GBY_295] (rows=252 width=215)
                                     Output:["_col0","_col1","_col2","_col3","_col4"],keys:_col0, _col3, _col4, _col1, _col2
-                                    Select Operator [SEL_294] (rows=1142 width=211)
+                                    Select Operator [SEL_294] (rows=126 width=211)
                                       Output:["_col0","_col1","_col2","_col3","_col4"]
-                                      Filter Operator [FIL_293] (rows=1142 width=248)
+                                      Filter Operator [FIL_293] (rows=126 width=248)
                                         predicate:((_col0 <= 10) or (rank_window_1 <= 10))
-                                        PTF Operator [PTF_292] (rows=1714 width=248)
+                                        PTF Operator [PTF_292] (rows=191 width=248)
                                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col4 AS decimal(15,4)) / CAST( _col5 AS decimal(15,4))) ASC NULLS LAST","partition by:":"0"}]
-                                          Select Operator [SEL_291] (rows=1714 width=248)
+                                          Select Operator [SEL_291] (rows=191 width=248)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                           <-Reducer 5 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_290]
                                               PartitionCols:0
-                                              Select Operator [SEL_289] (rows=1714 width=244)
+                                              Select Operator [SEL_289] (rows=191 width=244)
                                                 Output:["rank_window_0","_col0","_col1","_col2","_col3","_col4"]
-                                                PTF Operator [PTF_288] (rows=1714 width=244)
+                                                PTF Operator [PTF_288] (rows=191 width=244)
                                                   Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(CAST( _col1 AS decimal(15,4)) / CAST( _col2 AS decimal(15,4))) ASC NULLS LAST","partition by:":"0"}]
-                                                  Select Operator [SEL_287] (rows=1714 width=244)
+                                                  Select Operator [SEL_287] (rows=191 width=244)
                                                     Output:["_col0","_col1","_col2","_col3","_col4"]
                                                   <-Reducer 4 [SIMPLE_EDGE] vectorized
                                                     SHUFFLE [RS_286]
                                                       PartitionCols:0
-                                                      Group By Operator [GBY_285] (rows=1714 width=244)
+                                                      Group By Operator [GBY_285] (rows=191 width=244)
                                                         Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"],keys:KEY._col0
                                                       <-Reducer 3 [SIMPLE_EDGE]
                                                         SHUFFLE [RS_17]
                                                           PartitionCols:_col0
-                                                          Group By Operator [GBY_16] (rows=1714 width=244)
+                                                          Group By Operator [GBY_16] (rows=191 width=244)
                                                             Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col8)","sum(_col3)","sum(_col9)","sum(_col4)"],keys:_col1
-                                                            Merge Join Operator [MERGEJOIN_230] (rows=438010 width=236)
+                                                            Merge Join Operator [MERGEJOIN_230] (rows=787547 width=236)
                                                               Conds:RS_12._col1, _col2=RS_284._col0, _col1(Inner),Output:["_col1","_col3","_col4","_col8","_col9"]
                                                             <-Map 26 [SIMPLE_EDGE] vectorized
                                                               SHUFFLE [RS_284]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query5.q.out b/ql/src/test/results/clientpositive/perf/tez/query5.q.out
index e64036b..e9ac7c8 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query5.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query5.q.out
@@ -402,7 +402,7 @@ Stage-0
                                 PartitionCols:_col0
                                 Group By Operator [GBY_79] (rows=3498 width=548)
                                   Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col2)","sum(_col4)","sum(_col3)","sum(_col5)"],keys:_col8
-                                  Merge Join Operator [MERGEJOIN_224] (rows=30966059 width=543)
+                                  Merge Join Operator [MERGEJOIN_224] (rows=30969803 width=543)
                                     Conds:RS_75._col0=RS_318._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col8"]
                                   <-Map 30 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_318]
@@ -416,7 +416,7 @@ Stage-0
                                   <-Reducer 16 [SIMPLE_EDGE]
                                     SHUFFLE [RS_75]
                                       PartitionCols:_col0
-                                      Merge Join Operator [MERGEJOIN_223] (rows=30966059 width=447)
+                                      Merge Join Operator [MERGEJOIN_223] (rows=30969803 width=447)
                                         Conds:Union 26._col1=RS_278._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5"]
                                       <-Map 10 [SIMPLE_EDGE] vectorized
                                         SHUFFLE [RS_278]
@@ -446,9 +446,9 @@ Stage-0
                                         <-Reducer 28 [CONTAINS]
                                           Reduce Output Operator [RS_271]
                                             PartitionCols:_col1
-                                            Select Operator [SEL_269] (rows=134782734 width=454)
+                                            Select Operator [SEL_269] (rows=134816432 width=454)
                                               Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                                              Merge Join Operator [MERGEJOIN_268] (rows=134782734 width=230)
+                                              Merge Join Operator [MERGEJOIN_268] (rows=134816432 width=230)
                                                 Conds:RS_339._col0, _col2=RS_342._col1, _col2(Inner),Output:["_col1","_col3","_col6","_col7"]
                                               <-Map 27 [SIMPLE_EDGE] vectorized
                                                 SHUFFLE [RS_339]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query50.q.out b/ql/src/test/results/clientpositive/perf/tez/query50.q.out
index 43fd2e5..a84027d 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query50.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query50.q.out
@@ -144,22 +144,22 @@ Stage-0
       File Output Operator [FS_142]
         Limit [LIM_141] (rows=100 width=858)
           Number of rows:100
-          Select Operator [SEL_140] (rows=11945216 width=857)
+          Select Operator [SEL_140] (rows=13714317 width=857)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_139]
-              Group By Operator [GBY_138] (rows=11945216 width=857)
+              Group By Operator [GBY_138] (rows=13714317 width=857)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5, KEY._col6, KEY._col7, KEY._col8, KEY._col9
               <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_30]
                   PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
-                  Group By Operator [GBY_29] (rows=11945216 width=857)
+                  Group By Operator [GBY_29] (rows=13714317 width=857)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"],aggregations:["sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)"],keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
-                    Top N Key Operator [TNK_56] (rows=11945216 width=821)
+                    Top N Key Operator [TNK_56] (rows=13714317 width=821)
                       keys:_col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9,sort order:++++++++++,top n:100
-                      Select Operator [SEL_27] (rows=11945216 width=821)
+                      Select Operator [SEL_27] (rows=13714317 width=821)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
-                        Merge Join Operator [MERGEJOIN_120] (rows=11945216 width=821)
+                        Merge Join Operator [MERGEJOIN_120] (rows=13714317 width=821)
                           Conds:RS_24._col8=RS_137._col0(Inner),Output:["_col0","_col5","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21"]
                         <-Map 12 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_137]
@@ -173,7 +173,7 @@ Stage-0
                         <-Reducer 4 [SIMPLE_EDGE]
                           SHUFFLE [RS_24]
                             PartitionCols:_col8
-                            Merge Join Operator [MERGEJOIN_119] (rows=11945216 width=3)
+                            Merge Join Operator [MERGEJOIN_119] (rows=13714317 width=3)
                               Conds:RS_21._col5=RS_134._col0(Inner),Output:["_col0","_col5","_col8"]
                             <-Map 11 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_134]
@@ -187,7 +187,7 @@ Stage-0
                             <-Reducer 3 [SIMPLE_EDGE]
                               SHUFFLE [RS_21]
                                 PartitionCols:_col5
-                                Merge Join Operator [MERGEJOIN_118] (rows=11945216 width=3)
+                                Merge Join Operator [MERGEJOIN_118] (rows=13714317 width=3)
                                   Conds:RS_18._col1, _col2, _col3=RS_131._col1, _col2, _col4(Inner),Output:["_col0","_col5","_col8"]
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   PARTITION_ONLY_SHUFFLE [RS_18]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query51.q.out b/ql/src/test/results/clientpositive/perf/tez/query51.q.out
index da487ff..840c6cb 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query51.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query51.q.out
@@ -117,31 +117,31 @@ Stage-0
       File Output Operator [FS_117]
         Limit [LIM_116] (rows=100 width=636)
           Number of rows:100
-          Select Operator [SEL_115] (rows=363803676 width=636)
+          Select Operator [SEL_115] (rows=349700980 width=633)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
           <-Reducer 5 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_114]
-              Select Operator [SEL_113] (rows=363803676 width=636)
+              Select Operator [SEL_113] (rows=349700980 width=633)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                Filter Operator [FIL_112] (rows=363803676 width=420)
+                Filter Operator [FIL_112] (rows=349700980 width=414)
                   predicate:(max_window_0 > max_window_1)
-                  PTF Operator [PTF_111] (rows=1091411029 width=420)
+                  PTF Operator [PTF_111] (rows=1049102941 width=417)
                     Function definitions:[{},{"name:":"windowingtablefunction","order by:":"CASE WHEN (_col4 is not null) THEN (_col4) ELSE (_col1) END ASC NULLS LAST","partition by:":"CASE WHEN (_col3 is not null) THEN (_col3) ELSE (_col0) END"}]
-                    Select Operator [SEL_110] (rows=1091411029 width=420)
+                    Select Operator [SEL_110] (rows=1049102941 width=417)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                     <-Reducer 4 [SIMPLE_EDGE]
                       SHUFFLE [RS_43]
                         PartitionCols:CASE WHEN (_col3 is not null) THEN (_col3) ELSE (_col0) END
-                        Merge Join Operator [MERGEJOIN_87] (rows=1091411029 width=420)
+                        Merge Join Operator [MERGEJOIN_87] (rows=1049102941 width=417)
                           Conds:RS_40._col0, _col1=RS_41._col0, _col1(Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                         <-Reducer 10 [SIMPLE_EDGE]
                           SHUFFLE [RS_41]
                             PartitionCols:_col0, _col1
-                            Select Operator [SEL_37] (rows=3442937 width=210)
+                            Select Operator [SEL_37] (rows=3442303 width=210)
                               Output:["_col0","_col1","_col2"]
-                              PTF Operator [PTF_36] (rows=3442937 width=210)
+                              PTF Operator [PTF_36] (rows=3442303 width=210)
                                 Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS LAST","partition by:":"_col0"}]
-                                Group By Operator [GBY_32] (rows=3442937 width=210)
+                                Group By Operator [GBY_32] (rows=3442303 width=210)
                                   Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                 <-Reducer 9 [SIMPLE_EDGE]
                                   SHUFFLE [RS_31]
@@ -182,11 +182,11 @@ Stage-0
                         <-Reducer 3 [SIMPLE_EDGE]
                           SHUFFLE [RS_40]
                             PartitionCols:_col0, _col1
-                            Select Operator [SEL_17] (rows=3442937 width=210)
+                            Select Operator [SEL_17] (rows=3288241 width=210)
                               Output:["_col0","_col1","_col2"]
-                              PTF Operator [PTF_16] (rows=3442937 width=210)
+                              PTF Operator [PTF_16] (rows=3288241 width=210)
                                 Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS LAST","partition by:":"_col0"}]
-                                Group By Operator [GBY_12] (rows=3442937 width=210)
+                                Group By Operator [GBY_12] (rows=3288241 width=210)
                                   Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_11]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query57.q.out b/ql/src/test/results/clientpositive/perf/tez/query57.q.out
index 9579226..95dd584 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query57.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query57.q.out
@@ -126,29 +126,29 @@ Stage-0
       File Output Operator [FS_321]
         Limit [LIM_320] (rows=100 width=758)
           Number of rows:100
-          Select Operator [SEL_319] (rows=130121 width=758)
+          Select Operator [SEL_319] (rows=397735 width=758)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
           <-Reducer 7 [SIMPLE_EDGE]
             SHUFFLE [RS_110]
-              Select Operator [SEL_109] (rows=130121 width=758)
+              Select Operator [SEL_109] (rows=397735 width=758)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
-                Merge Join Operator [MERGEJOIN_278] (rows=130121 width=646)
+                Merge Join Operator [MERGEJOIN_278] (rows=397735 width=646)
                   Conds:RS_106._col5, _col6, _col12, _col7=RS_306._col0, _col1, _col4, _col2(Inner),Output:["_col3","_col5","_col6","_col8","_col9","_col10","_col11","_col16"]
                 <-Reducer 6 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_306]
                     PartitionCols:_col0, _col1, _col4, _col2
-                    Select Operator [SEL_304] (rows=87441185 width=404)
+                    Select Operator [SEL_304] (rows=2386410 width=404)
                       Output:["_col0","_col1","_col2","_col3","_col4"]
-                      Filter Operator [FIL_302] (rows=87441185 width=408)
+                      Filter Operator [FIL_302] (rows=2386410 width=408)
                         predicate:rank_window_0 is not null
-                        PTF Operator [PTF_300] (rows=87441185 width=408)
+                        PTF Operator [PTF_300] (rows=2386410 width=408)
                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS LAST, _col3 ASC NULLS LAST","partition by:":"_col1, _col0, _col4"}]
-                          Select Operator [SEL_299] (rows=87441185 width=408)
+                          Select Operator [SEL_299] (rows=2386410 width=408)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                           <-Reducer 5 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_297]
                               PartitionCols:_col1, _col0, _col4
-                              Group By Operator [GBY_296] (rows=87441185 width=408)
+                              Group By Operator [GBY_296] (rows=2386410 width=408)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
                               <-Reducer 4 [SIMPLE_EDGE]
                                 SHUFFLE [RS_93]
@@ -217,41 +217,41 @@ Stage-0
                 <-Reducer 9 [ONE_TO_ONE_EDGE]
                   FORWARD [RS_106]
                     PartitionCols:_col5, _col6, _col12, _col7
-                    Merge Join Operator [MERGEJOIN_277] (rows=130121 width=636)
+                    Merge Join Operator [MERGEJOIN_277] (rows=397735 width=636)
                       Conds:RS_307._col0, _col1, _col4, _col2=RS_318._col0, _col1, _col7, _col2(Inner),Output:["_col3","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
                     <-Reducer 6 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_307]
                         PartitionCols:_col0, _col1, _col4, _col2
-                        Select Operator [SEL_305] (rows=87441185 width=404)
+                        Select Operator [SEL_305] (rows=2386410 width=404)
                           Output:["_col0","_col1","_col2","_col3","_col4"]
-                          Filter Operator [FIL_303] (rows=87441185 width=408)
+                          Filter Operator [FIL_303] (rows=2386410 width=408)
                             predicate:rank_window_0 is not null
-                            PTF Operator [PTF_301] (rows=87441185 width=408)
+                            PTF Operator [PTF_301] (rows=2386410 width=408)
                               Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS LAST, _col3 ASC NULLS LAST","partition by:":"_col1, _col0, _col4"}]
                                Please refer to the previous Select Operator [SEL_299]
                     <-Reducer 11 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_318]
                         PartitionCols:_col0, _col1, _col7, _col2
-                        Select Operator [SEL_317] (rows=130121 width=524)
+                        Select Operator [SEL_317] (rows=397735 width=524)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                          Filter Operator [FIL_316] (rows=130121 width=524)
+                          Filter Operator [FIL_316] (rows=397735 width=524)
                             predicate:CASE WHEN ((_col0 > 0)) THEN (((abs((_col6 - _col0)) / _col0) > 0.1)) ELSE (false) END
-                            Select Operator [SEL_315] (rows=260242 width=520)
+                            Select Operator [SEL_315] (rows=795470 width=520)
                               Output:["rank_window_1","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                              Filter Operator [FIL_314] (rows=260242 width=520)
+                              Filter Operator [FIL_314] (rows=795470 width=520)
                                 predicate:((_col0 > 0) and rank_window_1 is not null and (_col3 = 2000))
-                                PTF Operator [PTF_313] (rows=87441185 width=520)
+                                PTF Operator [PTF_313] (rows=2386410 width=520)
                                   Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col3 ASC NULLS LAST, _col4 ASC NULLS LAST","partition by:":"_col2, _col1, _col5"}]
-                                  Select Operator [SEL_312] (rows=87441185 width=520)
+                                  Select Operator [SEL_312] (rows=2386410 width=520)
                                     Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                                   <-Reducer 10 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_311]
                                       PartitionCols:_col1, _col0, _col4
-                                      Select Operator [SEL_310] (rows=87441185 width=408)
+                                      Select Operator [SEL_310] (rows=2386410 width=408)
                                         Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5"]
-                                        PTF Operator [PTF_309] (rows=87441185 width=408)
+                                        PTF Operator [PTF_309] (rows=2386410 width=408)
                                           Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST, _col0 ASC NULLS FIRST, _col4 ASC NULLS FIRST, _col2 ASC NULLS FIRST","partition by:":"_col1, _col0, _col4, _col2"}]
-                                          Select Operator [SEL_308] (rows=87441185 width=408)
+                                          Select Operator [SEL_308] (rows=2386410 width=408)
                                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
                                           <-Reducer 5 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_298]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query59.q.out b/ql/src/test/results/clientpositive/perf/tez/query59.q.out
index 3c3cd2d..566f888 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query59.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query59.q.out
@@ -114,20 +114,20 @@ Stage-0
       File Output Operator [FS_211]
         Limit [LIM_210] (rows=100 width=976)
           Number of rows:100
-          Select Operator [SEL_209] (rows=1012347 width=976)
+          Select Operator [SEL_209] (rows=862591 width=976)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
           <-Reducer 6 [SIMPLE_EDGE]
             SHUFFLE [RS_59]
-              Select Operator [SEL_58] (rows=1012347 width=976)
+              Select Operator [SEL_58] (rows=862591 width=976)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
-                Merge Join Operator [MERGEJOIN_183] (rows=1012347 width=1648)
+                Merge Join Operator [MERGEJOIN_183] (rows=862591 width=1648)
                   Conds:RS_55._col11, _col0=RS_56._col1, (_col0 - 52)(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col11","_col12","_col15","_col16","_col17","_col18","_col19","_col20"]
                 <-Reducer 11 [SIMPLE_EDGE]
                   SHUFFLE [RS_56]
                     PartitionCols:_col1, (_col0 - 52)
-                    Select Operator [SEL_48] (rows=28847 width=776)
+                    Select Operator [SEL_48] (rows=26628 width=776)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                      Merge Join Operator [MERGEJOIN_182] (rows=28847 width=776)
+                      Merge Join Operator [MERGEJOIN_182] (rows=26628 width=776)
                         Conds:RS_45._col1=RS_208._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col10"]
                       <-Map 15 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_208]
@@ -141,7 +141,7 @@ Stage-0
                       <-Reducer 10 [SIMPLE_EDGE]
                         SHUFFLE [RS_45]
                           PartitionCols:_col1
-                          Merge Join Operator [MERGEJOIN_181] (rows=28847 width=676)
+                          Merge Join Operator [MERGEJOIN_181] (rows=26628 width=676)
                             Conds:RS_205._col0=RS_200._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
                           <-Map 13 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_200]
@@ -155,7 +155,7 @@ Stage-0
                           <-Reducer 9 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_205]
                               PartitionCols:_col0
-                              Group By Operator [GBY_204] (rows=1196832 width=679)
+                              Group By Operator [GBY_204] (rows=1104768 width=679)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)"],keys:KEY._col0, KEY._col1
                               <-Reducer 8 [SIMPLE_EDGE]
                                 SHUFFLE [RS_33]
@@ -187,7 +187,7 @@ Stage-0
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_55]
                     PartitionCols:_col11, _col0
-                    Merge Join Operator [MERGEJOIN_179] (rows=28847 width=976)
+                    Merge Join Operator [MERGEJOIN_179] (rows=26628 width=976)
                       Conds:RS_52._col1=RS_203._col0(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col11","_col12"]
                     <-Map 14 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_203]
@@ -201,7 +201,7 @@ Stage-0
                     <-Reducer 4 [SIMPLE_EDGE]
                       SHUFFLE [RS_52]
                         PartitionCols:_col1
-                        Merge Join Operator [MERGEJOIN_178] (rows=28847 width=788)
+                        Merge Join Operator [MERGEJOIN_178] (rows=26628 width=788)
                           Conds:RS_194._col0=RS_199._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
                         <-Map 13 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_199]
@@ -214,7 +214,7 @@ Stage-0
                         <-Reducer 3 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_194]
                             PartitionCols:_col0
-                            Group By Operator [GBY_193] (rows=1196832 width=791)
+                            Group By Operator [GBY_193] (rows=1104768 width=791)
                               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)"],keys:KEY._col0, KEY._col1
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_12]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query6.q.out b/ql/src/test/results/clientpositive/perf/tez/query6.q.out
index f7e2e50..d7d045a 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query6.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query6.q.out
@@ -99,7 +99,7 @@ Stage-0
                     PartitionCols:_col0
                     Group By Operator [GBY_69] (rows=1 width=94)
                       Output:["_col0","_col1"],aggregations:["count()"],keys:_col9
-                      Merge Join Operator [MERGEJOIN_175] (rows=500 width=86)
+                      Merge Join Operator [MERGEJOIN_175] (rows=40 width=86)
                         Conds:RS_65._col4=RS_215._col0(Inner),Output:["_col9"]
                       <-Map 16 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_215]
@@ -164,27 +164,27 @@ Stage-0
                       <-Reducer 7 [SIMPLE_EDGE]
                         SHUFFLE [RS_65]
                           PartitionCols:_col4
-                          Merge Join Operator [MERGEJOIN_174] (rows=7192227 width=90)
+                          Merge Join Operator [MERGEJOIN_174] (rows=575379 width=90)
                             Conds:RS_224._col5=RS_63._col0(Inner),Output:["_col4","_col9"]
                           <-Map 6 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_224]
                               PartitionCols:_col5
-                              Map Join Operator [MAPJOIN_223] (rows=7192227 width=4)
+                              Map Join Operator [MAPJOIN_223] (rows=575379 width=4)
                                 Conds:RS_193._col0=SEL_222._col0(Inner),HybridGraceHashJoin:true,Output:["_col4","_col5"]
                               <-Map 1 [BROADCAST_EDGE] vectorized
                                 BROADCAST [RS_193]
                                   PartitionCols:_col0
-                                  Map Join Operator [MAPJOIN_192] (rows=660 width=4)
+                                  Map Join Operator [MAPJOIN_192] (rows=52 width=4)
                                     Conds:SEL_191._col1=RS_189._col0(Inner),HybridGraceHashJoin:true,Output:["_col0"]
                                   <-Reducer 3 [BROADCAST_EDGE] vectorized
                                     BROADCAST [RS_189]
                                       PartitionCols:_col0
-                                      Group By Operator [GBY_188] (rows=25 width=4)
+                                      Group By Operator [GBY_188] (rows=2 width=4)
                                         Output:["_col0"],keys:KEY._col0
                                       <-Map 2 [SIMPLE_EDGE] vectorized
                                         SHUFFLE [RS_186]
                                           PartitionCols:_col0
-                                          Group By Operator [GBY_184] (rows=25 width=4)
+                                          Group By Operator [GBY_184] (rows=2 width=4)
                                             Output:["_col0"],keys:d_month_seq
                                             Select Operator [SEL_182] (rows=50 width=12)
                                               Output:["d_month_seq"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query64.q.out b/ql/src/test/results/clientpositive/perf/tez/query64.q.out
index 827a38c..797d627 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query64.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query64.q.out
@@ -316,15 +316,15 @@ Stage-0
     Stage-1
       Reducer 12 vectorized
       File Output Operator [FS_1216]
-        Select Operator [SEL_1215] (rows=98913657102 width=1702)
+        Select Operator [SEL_1215] (rows=103945601867 width=1702)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20"]
         <-Reducer 11 [SIMPLE_EDGE]
           SHUFFLE [RS_259]
-            Select Operator [SEL_258] (rows=98913657102 width=1694)
+            Select Operator [SEL_258] (rows=103945601867 width=1694)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"]
-              Filter Operator [FIL_257] (rows=98913657102 width=1694)
+              Filter Operator [FIL_257] (rows=103945601867 width=1694)
                 predicate:(_col19 <= _col12)
-                Merge Join Operator [MERGEJOIN_1111] (rows=296740971306 width=1694)
+                Merge Join Operator [MERGEJOIN_1111] (rows=311836805602 width=1694)
                   Conds:RS_1195._col2, _col1, _col3=RS_1214._col1, _col0, _col2(Inner),Output:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col19","_col20","_col21","_col22"]
                 <-Reducer 10 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_1195]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query65.q.out b/ql/src/test/results/clientpositive/perf/tez/query65.q.out
index f389c5e..69b12f6 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query65.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query65.q.out
@@ -86,13 +86,13 @@ Stage-0
       File Output Operator [FS_172]
         Limit [LIM_171] (rows=100 width=705)
           Number of rows:100
-          Select Operator [SEL_170] (rows=65392 width=704)
+          Select Operator [SEL_170] (rows=56354 width=703)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
           <-Reducer 6 [SIMPLE_EDGE]
             SHUFFLE [RS_53]
-              Select Operator [SEL_52] (rows=65392 width=704)
+              Select Operator [SEL_52] (rows=56354 width=703)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
-                Merge Join Operator [MERGEJOIN_139] (rows=65392 width=704)
+                Merge Join Operator [MERGEJOIN_139] (rows=56354 width=703)
                   Conds:RS_49._col1=RS_169._col0(Inner),Output:["_col2","_col6","_col8","_col9","_col10","_col11"]
                 <-Map 13 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_169]
@@ -106,7 +106,7 @@ Stage-0
                 <-Reducer 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_49]
                     PartitionCols:_col1
-                    Merge Join Operator [MERGEJOIN_138] (rows=65392 width=204)
+                    Merge Join Operator [MERGEJOIN_138] (rows=56354 width=204)
                       Conds:RS_46._col0=RS_166._col0(Inner),Output:["_col1","_col2","_col6"]
                     <-Map 12 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_166]
@@ -120,21 +120,21 @@ Stage-0
                     <-Reducer 4 [ONE_TO_ONE_EDGE]
                       FORWARD [RS_46]
                         PartitionCols:_col0
-                        Filter Operator [FIL_45] (rows=65392 width=231)
+                        Filter Operator [FIL_45] (rows=56354 width=231)
                           predicate:(_col2 <= _col4)
-                          Merge Join Operator [MERGEJOIN_137] (rows=196176 width=231)
+                          Merge Join Operator [MERGEJOIN_137] (rows=169062 width=231)
                             Conds:RS_157._col0=RS_163._col0(Inner),Output:["_col0","_col1","_col2","_col4"]
                           <-Reducer 3 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_157]
                               PartitionCols:_col0
-                              Filter Operator [FIL_156] (rows=184637 width=118)
+                              Filter Operator [FIL_156] (rows=158496 width=118)
                                 predicate:_col2 is not null
-                                Group By Operator [GBY_155] (rows=184637 width=118)
+                                Group By Operator [GBY_155] (rows=158496 width=118)
                                   Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_11]
                                     PartitionCols:_col0, _col1
-                                    Group By Operator [GBY_10] (rows=6093021 width=118)
+                                    Group By Operator [GBY_10] (rows=5230368 width=118)
                                       Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col2, _col1
                                       Merge Join Operator [MERGEJOIN_135] (rows=91197860 width=89)
                                         Conds:RS_153._col0=RS_142._col0(Inner),Output:["_col1","_col2","_col3"]
@@ -170,20 +170,20 @@ Stage-0
                           <-Reducer 9 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_163]
                               PartitionCols:_col0
-                              Select Operator [SEL_162] (rows=17 width=115)
+                              Select Operator [SEL_162] (rows=16 width=115)
                                 Output:["_col0","_col1"]
-                                Filter Operator [FIL_161] (rows=17 width=123)
+                                Filter Operator [FIL_161] (rows=16 width=123)
                                   predicate:(_col1 is not null and _col2 is not null)
-                                  Group By Operator [GBY_160] (rows=17 width=123)
+                                  Group By Operator [GBY_160] (rows=16 width=123)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","count(_col2)"],keys:_col1
-                                    Select Operator [SEL_159] (rows=184637 width=118)
+                                    Select Operator [SEL_159] (rows=173776 width=118)
                                       Output:["_col1","_col2"]
-                                      Group By Operator [GBY_158] (rows=184637 width=118)
+                                      Group By Operator [GBY_158] (rows=173776 width=118)
                                         Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                       <-Reducer 8 [SIMPLE_EDGE]
                                         SHUFFLE [RS_27]
                                           PartitionCols:_col0
-                                          Group By Operator [GBY_26] (rows=6093021 width=118)
+                                          Group By Operator [GBY_26] (rows=5734608 width=118)
                                             Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col2, _col1
                                             Merge Join Operator [MERGEJOIN_136] (rows=91197860 width=89)
                                               Conds:RS_154._col0=RS_144._col0(Inner),Output:["_col1","_col2","_col3"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query69.q.out b/ql/src/test/results/clientpositive/perf/tez/query69.q.out
index 2a9bc81..abe5e61 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query69.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query69.q.out
@@ -164,17 +164,17 @@ Stage-0
                                   Output:["_col0","_col6","_col7","_col8","_col9","_col10"]
                                   Filter Operator [FIL_47] (rows=1 width=367)
                                     predicate:_col12 is null
-                                    Merge Join Operator [MERGEJOIN_183] (rows=33 width=367)
+                                    Merge Join Operator [MERGEJOIN_183] (rows=30 width=367)
                                       Conds:RS_44._col0=RS_214._col0(Left Outer),Output:["_col0","_col6","_col7","_col8","_col9","_col10","_col12"]
                                     <-Reducer 4 [ONE_TO_ONE_EDGE]
                                       FORWARD [RS_44]
                                         PartitionCols:_col0
-                                        Merge Join Operator [MERGEJOIN_182] (rows=6841 width=363)
+                                        Merge Join Operator [MERGEJOIN_182] (rows=6239 width=363)
                                           Conds:RS_41._col0=RS_42._col0(Left Semi),Output:["_col0","_col6","_col7","_col8","_col9","_col10"]
                                         <-Reducer 14 [SIMPLE_EDGE]
                                           SHUFFLE [RS_42]
                                             PartitionCols:_col0
-                                            Group By Operator [GBY_40] (rows=116289 width=1)
+                                            Group By Operator [GBY_40] (rows=106060 width=1)
                                               Output:["_col0"],keys:_col0
                                               Select Operator [SEL_18] (rows=43153353 width=1)
                                                 Output:["_col0"]
@@ -249,14 +249,14 @@ Stage-0
                                     <-Reducer 18 [ONE_TO_ONE_EDGE] vectorized
                                       FORWARD [RS_214]
                                         PartitionCols:_col0
-                                        Select Operator [SEL_213] (rows=116289 width=7)
+                                        Select Operator [SEL_213] (rows=116231 width=7)
                                           Output:["_col0","_col1"]
-                                          Group By Operator [GBY_212] (rows=116289 width=3)
+                                          Group By Operator [GBY_212] (rows=116231 width=3)
                                             Output:["_col0"],keys:KEY._col0
                                           <-Reducer 17 [SIMPLE_EDGE]
                                             SHUFFLE [RS_30]
                                               PartitionCols:_col0
-                                              Group By Operator [GBY_29] (rows=116289 width=3)
+                                              Group By Operator [GBY_29] (rows=116231 width=3)
                                                 Output:["_col0"],keys:_col1
                                                 Merge Join Operator [MERGEJOIN_180] (rows=11823304 width=3)
                                                   Conds:RS_211._col0=RS_198._col0(Inner),Output:["_col1"]
@@ -281,20 +281,20 @@ Stage-0
                                                               FORWARD [RS_153]
                                                                 Group By Operator [GBY_152] (rows=1 width=12)
                                                                   Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"]
-                                                                  Select Operator [SEL_151] (rows=6841 width=4)
+                                                                  Select Operator [SEL_151] (rows=6239 width=4)
                                                                     Output:["_col0"]
                                                                      Please refer to the previous Merge Join Operator [MERGEJOIN_182]
                             <-Reducer 20 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_222]
                                 PartitionCols:_col0
-                                Select Operator [SEL_221] (rows=115467 width=7)
+                                Select Operator [SEL_221] (rows=114314 width=7)
                                   Output:["_col0","_col1"]
-                                  Group By Operator [GBY_220] (rows=115467 width=3)
+                                  Group By Operator [GBY_220] (rows=114314 width=3)
                                     Output:["_col0"],keys:KEY._col0
                                   <-Reducer 19 [SIMPLE_EDGE]
                                     SHUFFLE [RS_60]
                                       PartitionCols:_col0
-                                      Group By Operator [GBY_59] (rows=115467 width=3)
+                                      Group By Operator [GBY_59] (rows=114314 width=3)
                                         Output:["_col0"],keys:_col1
                                         Merge Join Operator [MERGEJOIN_181] (rows=23255411 width=3)
                                           Conds:RS_219._col0=RS_199._col0(Inner),Output:["_col1"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query7.q.out b/ql/src/test/results/clientpositive/perf/tez/query7.q.out
index b8e0ce7..8638ea0 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query7.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query7.q.out
@@ -83,9 +83,9 @@ Stage-0
                     PartitionCols:_col0
                     Group By Operator [GBY_28] (rows=462000 width=476)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"],aggregations:["sum(_col4)","count(_col4)","sum(_col5)","count(_col5)","sum(_col7)","count(_col7)","sum(_col6)","count(_col6)"],keys:_col12
-                      Top N Key Operator [TNK_55] (rows=1441769 width=100)
+                      Top N Key Operator [TNK_55] (rows=1655321 width=100)
                         keys:_col12,sort order:+,top n:100
-                        Merge Join Operator [MERGEJOIN_99] (rows=1441769 width=100)
+                        Merge Join Operator [MERGEJOIN_99] (rows=1655321 width=100)
                           Conds:RS_24._col1=RS_119._col0(Inner),Output:["_col4","_col5","_col6","_col7","_col12"]
                         <-Map 12 [SIMPLE_EDGE] vectorized
                           SHUFFLE [RS_119]
@@ -99,7 +99,7 @@ Stage-0
                         <-Reducer 4 [SIMPLE_EDGE]
                           SHUFFLE [RS_24]
                             PartitionCols:_col1
-                            Merge Join Operator [MERGEJOIN_98] (rows=1441769 width=4)
+                            Merge Join Operator [MERGEJOIN_98] (rows=1655321 width=4)
                               Conds:RS_21._col3=RS_116._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col7"]
                             <-Map 11 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_116]
@@ -113,7 +113,7 @@ Stage-0
                             <-Reducer 3 [SIMPLE_EDGE]
                               SHUFFLE [RS_21]
                                 PartitionCols:_col3
-                                Merge Join Operator [MERGEJOIN_97] (rows=1441769 width=4)
+                                Merge Join Operator [MERGEJOIN_97] (rows=1655321 width=4)
                                   Conds:RS_18._col0=RS_113._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7"]
                                 <-Map 10 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_113]
@@ -127,7 +127,7 @@ Stage-0
                                 <-Reducer 2 [SIMPLE_EDGE]
                                   SHUFFLE [RS_18]
                                     PartitionCols:_col0
-                                    Merge Join Operator [MERGEJOIN_96] (rows=4037893 width=4)
+                                    Merge Join Operator [MERGEJOIN_96] (rows=4635977 width=4)
                                       Conds:RS_110._col2=RS_102._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
                                     <-Map 8 [SIMPLE_EDGE] vectorized
                                       PARTITION_ONLY_SHUFFLE [RS_102]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query72.q.out b/ql/src/test/results/clientpositive/perf/tez/query72.q.out
index 2cc0b39..f90f6d7 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query72.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query72.q.out
@@ -104,20 +104,20 @@ Stage-0
       File Output Operator [FS_295]
         Limit [LIM_294] (rows=100 width=312)
           Number of rows:100
-          Select Operator [SEL_293] (rows=384313734 width=312)
+          Select Operator [SEL_293] (rows=78286131 width=312)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_292]
-              Group By Operator [GBY_291] (rows=384313734 width=312)
+              Group By Operator [GBY_291] (rows=78286131 width=312)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(VALUE._col0)","count(VALUE._col1)","count(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
               <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_70]
                   PartitionCols:_col0, _col1, _col2
-                  Group By Operator [GBY_69] (rows=576990095 width=312)
+                  Group By Operator [GBY_69] (rows=622787354 width=312)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col3)","count(_col4)","count()"],keys:_col0, _col1, _col2
-                    Select Operator [SEL_67] (rows=1488051228 width=292)
+                    Select Operator [SEL_67] (rows=1606161864 width=292)
                       Output:["_col0","_col1","_col2","_col3","_col4"]
-                      Merge Join Operator [MERGEJOIN_252] (rows=1488051228 width=292)
+                      Merge Join Operator [MERGEJOIN_252] (rows=1606161864 width=292)
                         Conds:RS_64._col4, _col6=RS_290._col0, _col1(Left Outer),Output:["_col13","_col15","_col19","_col25"]
                       <-Map 24 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_290]
@@ -131,9 +131,9 @@ Stage-0
                       <-Reducer 4 [SIMPLE_EDGE]
                         SHUFFLE [RS_64]
                           PartitionCols:_col4, _col6
-                          Select Operator [SEL_60] (rows=576990095 width=300)
+                          Select Operator [SEL_60] (rows=622787354 width=300)
                             Output:["_col4","_col6","_col13","_col15","_col19","_col25"]
-                            Merge Join Operator [MERGEJOIN_251] (rows=576990095 width=300)
+                            Merge Join Operator [MERGEJOIN_251] (rows=622787354 width=300)
                               Conds:RS_57._col0, _col19=RS_287._col0, _col1(Inner),Output:["_col5","_col9","_col14","_col16","_col19","_col23"]
                             <-Map 23 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_287]
@@ -147,18 +147,18 @@ Stage-0
                             <-Reducer 3 [SIMPLE_EDGE]
                               SHUFFLE [RS_57]
                                 PartitionCols:_col0, _col19
-                                Filter Operator [FIL_56] (rows=516036043 width=311)
+                                Filter Operator [FIL_56] (rows=556995215 width=311)
                                   predicate:(_col3 < _col17)
-                                  Merge Join Operator [MERGEJOIN_250] (rows=1548108131 width=311)
+                                  Merge Join Operator [MERGEJOIN_250] (rows=1670985646 width=311)
                                     Conds:RS_53._col1=RS_54._col8(Inner),Output:["_col0","_col3","_col5","_col9","_col14","_col16","_col17","_col19","_col23"]
                                   <-Reducer 15 [SIMPLE_EDGE]
                                     SHUFFLE [RS_54]
                                       PartitionCols:_col8
-                                      Select Operator [SEL_46] (rows=2712713 width=219)
+                                      Select Operator [SEL_46] (rows=2781538 width=219)
                                         Output:["_col3","_col8","_col10","_col11","_col13","_col17"]
-                                        Filter Operator [FIL_45] (rows=2712713 width=219)
+                                        Filter Operator [FIL_45] (rows=2781538 width=219)
                                           predicate:(_col17 > _col10)
-                                          Merge Join Operator [MERGEJOIN_249] (rows=8138139 width=219)
+                                          Merge Join Operator [MERGEJOIN_249] (rows=8344616 width=219)
                                             Conds:RS_42._col1=RS_284._col0(Inner),Output:["_col4","_col6","_col7","_col9","_col10","_col13","_col15","_col17"]
                                           <-Map 22 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_284]
@@ -172,7 +172,7 @@ Stage-0
                                           <-Reducer 14 [SIMPLE_EDGE]
                                             SHUFFLE [RS_42]
                                               PartitionCols:_col1
-                                              Merge Join Operator [MERGEJOIN_248] (rows=8138139 width=214)
+                                              Merge Join Operator [MERGEJOIN_248] (rows=8344616 width=214)
                                                 Conds:RS_39._col4=RS_281._col0(Inner),Output:["_col1","_col4","_col6","_col7","_col9","_col10","_col13","_col15"]
                                               <-Map 21 [SIMPLE_EDGE] vectorized
                                                 SHUFFLE [RS_281]
@@ -186,7 +186,7 @@ Stage-0
                                               <-Reducer 13 [SIMPLE_EDGE]
                                                 SHUFFLE [RS_39]
                                                   PartitionCols:_col4
-                                                  Merge Join Operator [MERGEJOIN_247] (rows=8138139 width=30)
+                                                  Merge Join Operator [MERGEJOIN_247] (rows=8344616 width=30)
                                                     Conds:RS_36._col5=RS_278._col0(Left Outer),Output:["_col1","_col4","_col6","_col7","_col9","_col10","_col13"]
                                                   <-Map 20 [SIMPLE_EDGE] vectorized
                                                     SHUFFLE [RS_278]
@@ -200,7 +200,7 @@ Stage-0
                                                   <-Reducer 12 [SIMPLE_EDGE]
                                                     SHUFFLE [RS_36]
                                                       PartitionCols:_col5
-                                                      Merge Join Operator [MERGEJOIN_246] (rows=8138139 width=29)
+                                                      Merge Join Operator [MERGEJOIN_246] (rows=8344616 width=29)
                                                         Conds:RS_33._col3=RS_275._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col9","_col10"]
                                                       <-Map 19 [SIMPLE_EDGE] vectorized
                                                         SHUFFLE [RS_275]
@@ -214,7 +214,7 @@ Stage-0
                                                       <-Reducer 11 [SIMPLE_EDGE]
                                                         SHUFFLE [RS_33]
                                                           PartitionCols:_col3
-                                                          Merge Join Operator [MERGEJOIN_245] (rows=40690691 width=35)
+                                                          Merge Join Operator [MERGEJOIN_245] (rows=41723078 width=35)
                                                             Conds:RS_30._col2=RS_272._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10"]
                                                           <-Map 18 [SIMPLE_EDGE] vectorized
                                                             SHUFFLE [RS_272]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query75.q.out b/ql/src/test/results/clientpositive/perf/tez/query75.q.out
index aa97bdc..4b923a0 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query75.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query75.q.out
@@ -204,20 +204,20 @@ Stage-0
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
           Limit [LIM_616] (rows=100 width=152)
             Number of rows:100
-            Select Operator [SEL_615] (rows=3422897230256 width=151)
+            Select Operator [SEL_615] (rows=7853634 width=152)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
             <-Reducer 9 [SIMPLE_EDGE]
               SHUFFLE [RS_175]
-                Select Operator [SEL_174] (rows=3422897230256 width=151)
+                Select Operator [SEL_174] (rows=7853634 width=152)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
-                  Filter Operator [FIL_173] (rows=3422897230256 width=255)
+                  Filter Operator [FIL_173] (rows=7853634 width=256)
                     predicate:((CAST( _col10 AS decimal(17,2)) / CAST( _col4 AS decimal(17,2))) < 0.9)
-                    Merge Join Operator [MERGEJOIN_518] (rows=10268691690770 width=255)
+                    Merge Join Operator [MERGEJOIN_518] (rows=23560904 width=256)
                       Conds:RS_611._col0, _col1, _col2, _col3=RS_614._col0, _col1, _col2, _col3(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col10","_col11"]
                     <-Reducer 27 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_614]
                         PartitionCols:_col0, _col1, _col2, _col3
-                        Group By Operator [GBY_613] (rows=84235776 width=135)
+                        Group By Operator [GBY_613] (rows=40320 width=136)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col4)","sum(_col5)"],keys:_col0, _col1, _col2, _col3
                           Group By Operator [GBY_612] (rows=736356923 width=131)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
@@ -419,7 +419,7 @@ Stage-0
                     <-Reducer 8 [SIMPLE_EDGE] vectorized
                       SHUFFLE [RS_611]
                         PartitionCols:_col0, _col1, _col2, _col3
-                        Group By Operator [GBY_610] (rows=84235776 width=135)
+                        Group By Operator [GBY_610] (rows=40320 width=136)
                           Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col4)","sum(_col5)"],keys:_col0, _col1, _col2, _col3
                           Group By Operator [GBY_609] (rows=736356923 width=131)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
diff --git a/ql/src/test/results/clientpositive/perf/tez/query77.q.out b/ql/src/test/results/clientpositive/perf/tez/query77.q.out
index b3086e9..6fb5cbb 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query77.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query77.q.out
@@ -268,23 +268,23 @@ Stage-0
     Stage-1
       Reducer 8 vectorized
       File Output Operator [FS_367]
-        Limit [LIM_366] (rows=52 width=439)
+        Limit [LIM_366] (rows=63 width=439)
           Number of rows:100
-          Select Operator [SEL_365] (rows=52 width=439)
+          Select Operator [SEL_365] (rows=63 width=439)
             Output:["_col0","_col1","_col2","_col3","_col4"]
           <-Reducer 7 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_364]
-              Select Operator [SEL_363] (rows=52 width=439)
+              Select Operator [SEL_363] (rows=63 width=439)
                 Output:["_col0","_col1","_col2","_col3","_col4"]
-                Group By Operator [GBY_362] (rows=52 width=447)
+                Group By Operator [GBY_362] (rows=63 width=447)
                   Output:["_col0","_col1","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2
                 <-Union 6 [SIMPLE_EDGE]
                   <-Reducer 16 [CONTAINS]
                     Reduce Output Operator [RS_322]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_321] (rows=52 width=447)
+                      Group By Operator [GBY_321] (rows=63 width=447)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Top N Key Operator [TNK_320] (rows=35 width=435)
+                        Top N Key Operator [TNK_320] (rows=56 width=435)
                           keys:_col0, _col1, 0L,sort order:+++,top n:100
                           Select Operator [SEL_318] (rows=2 width=439)
                             Output:["_col0","_col1","_col2","_col3","_col4"]
@@ -356,13 +356,13 @@ Stage-0
                   <-Reducer 23 [CONTAINS]
                     Reduce Output Operator [RS_328]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_327] (rows=52 width=447)
+                      Group By Operator [GBY_327] (rows=63 width=447)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Top N Key Operator [TNK_326] (rows=35 width=435)
+                        Top N Key Operator [TNK_326] (rows=56 width=435)
                           keys:_col0, _col1, 0L,sort order:+++,top n:100
-                          Select Operator [SEL_324] (rows=23 width=435)
+                          Select Operator [SEL_324] (rows=44 width=435)
                             Output:["_col0","_col1","_col2","_col3","_col4"]
-                            Merge Join Operator [MERGEJOIN_323] (rows=23 width=452)
+                            Merge Join Operator [MERGEJOIN_323] (rows=44 width=340)
                               Conds:RS_390._col0=RS_395._col0(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5"]
                             <-Reducer 22 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_390]
@@ -417,12 +417,12 @@ Stage-0
                             <-Reducer 27 [ONE_TO_ONE_EDGE] vectorized
                               FORWARD [RS_395]
                                 PartitionCols:_col0
-                                Group By Operator [GBY_394] (rows=23 width=228)
+                                Group By Operator [GBY_394] (rows=21 width=228)
                                   Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0
                                 <-Reducer 26 [SIMPLE_EDGE]
                                   SHUFFLE [RS_114]
                                     PartitionCols:_col0
-                                    Group By Operator [GBY_113] (rows=23 width=228)
+                                    Group By Operator [GBY_113] (rows=21 width=228)
                                       Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","sum(_col3)"],keys:_col5
                                       Merge Join Operator [MERGEJOIN_307] (rows=1458758 width=137)
                                         Conds:RS_109._col1=RS_388._col0(Inner),Output:["_col2","_col3","_col5"]
@@ -451,9 +451,9 @@ Stage-0
                   <-Reducer 5 [CONTAINS]
                     Reduce Output Operator [RS_316]
                       PartitionCols:_col0, _col1, _col2
-                      Group By Operator [GBY_315] (rows=52 width=447)
+                      Group By Operator [GBY_315] (rows=63 width=447)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"],keys:_col0, _col1, 0L
-                        Top N Key Operator [TNK_314] (rows=35 width=435)
+                        Top N Key Operator [TNK_314] (rows=56 width=435)
                           keys:_col0, _col1, 0L,sort order:+++,top n:100
                           Select Operator [SEL_312] (rows=10 width=437)
                             Output:["_col0","_col1","_col2","_col3","_col4"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query78.q.out b/ql/src/test/results/clientpositive/perf/tez/query78.q.out
index 6ff50df..85cebfd 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query78.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query78.q.out
@@ -158,13 +158,13 @@ Stage-0
       File Output Operator [FS_276]
         Limit [LIM_275] (rows=100 width=484)
           Number of rows:100
-          Select Operator [SEL_274] (rows=1831943309424 width=483)
+          Select Operator [SEL_274] (rows=1864495018431 width=483)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
           <-Reducer 5 [SIMPLE_EDGE]
             SHUFFLE [RS_76]
-              Select Operator [SEL_75] (rows=1831943309424 width=719)
+              Select Operator [SEL_75] (rows=1864495018431 width=719)
                 Output:["_col0","_col1","_col2","_col6","_col7","_col8","_col9","_col10","_col11","_col12"]
-                Merge Join Operator [MERGEJOIN_223] (rows=1831943309424 width=715)
+                Merge Join Operator [MERGEJOIN_223] (rows=1864495018431 width=715)
                   Conds:RS_72._col1=RS_273._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9","_col11","_col12","_col13","_col14","_col15"]
                 <-Reducer 12 [SIMPLE_EDGE] vectorized
                   SHUFFLE [RS_273]
@@ -234,7 +234,7 @@ Stage-0
                 <-Reducer 4 [SIMPLE_EDGE]
                   SHUFFLE [RS_72]
                     PartitionCols:_col1
-                    Merge Join Operator [MERGEJOIN_222] (rows=9160455599 width=471)
+                    Merge Join Operator [MERGEJOIN_222] (rows=9165006707 width=471)
                       Conds:RS_248._col1, _col0=RS_260._col1, _col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9"]
                     <-Reducer 3 [ONE_TO_ONE_EDGE] vectorized
                       FORWARD [RS_248]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query81.q.out b/ql/src/test/results/clientpositive/perf/tez/query81.q.out
index fd23922..52d1106 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query81.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query81.q.out
@@ -88,26 +88,26 @@ Stage-0
     Stage-1
       Reducer 4 vectorized
       File Output Operator [FS_215]
-        Select Operator [SEL_214] (rows=100 width=1506)
+        Select Operator [SEL_214] (rows=100 width=1504)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15"]
-          Limit [LIM_213] (rows=100 width=1420)
+          Limit [LIM_213] (rows=100 width=1418)
             Number of rows:100
-            Select Operator [SEL_212] (rows=1577696 width=1418)
+            Select Operator [SEL_212] (rows=1515166 width=1418)
               Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
             <-Reducer 3 [SIMPLE_EDGE]
               SHUFFLE [RS_66]
-                Select Operator [SEL_65] (rows=1577696 width=1418)
+                Select Operator [SEL_65] (rows=1515166 width=1418)
                   Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
-                  Merge Join Operator [MERGEJOIN_181] (rows=1577696 width=1418)
+                  Merge Join Operator [MERGEJOIN_181] (rows=1515166 width=1418)
                     Conds:RS_62._col0=RS_63._col0(Inner),Output:["_col1","_col3","_col4","_col5","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col19"]
                   <-Reducer 10 [SIMPLE_EDGE]
                     SHUFFLE [RS_63]
                       PartitionCols:_col0
-                      Select Operator [SEL_58] (rows=1609248 width=227)
+                      Select Operator [SEL_58] (rows=1545467 width=227)
                         Output:["_col0","_col2"]
-                        Filter Operator [FIL_57] (rows=1609248 width=227)
+                        Filter Operator [FIL_57] (rows=1545467 width=227)
                           predicate:(_col2 > _col3)
-                          Merge Join Operator [MERGEJOIN_180] (rows=4827746 width=227)
+                          Merge Join Operator [MERGEJOIN_180] (rows=4636401 width=227)
                             Conds:RS_205._col1=RS_211._col1(Inner),Output:["_col0","_col2","_col3"]
                           <-Reducer 13 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_211]
@@ -164,11 +164,11 @@ Stage-0
                           <-Reducer 9 [SIMPLE_EDGE] vectorized
                             SHUFFLE [RS_205]
                               PartitionCols:_col1
-                              Filter Operator [FIL_204] (rows=4827746 width=201)
+                              Filter Operator [FIL_204] (rows=4636401 width=201)
                                 predicate:_col2 is not null
-                                Select Operator [SEL_203] (rows=4827746 width=201)
+                                Select Operator [SEL_203] (rows=4636401 width=201)
                                   Output:["_col0","_col1","_col2"]
-                                  Group By Operator [GBY_202] (rows=4827746 width=201)
+                                  Group By Operator [GBY_202] (rows=4636401 width=201)
                                     Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1
                                   <-Reducer 8 [SIMPLE_EDGE]
                                     SHUFFLE [RS_23]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query84.q.out b/ql/src/test/results/clientpositive/perf/tez/query84.q.out
index 35cf670..ef41408 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query84.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query84.q.out
@@ -70,13 +70,13 @@ Stage-0
       File Output Operator [FS_141]
         Limit [LIM_140] (rows=100 width=384)
           Number of rows:100
-          Select Operator [SEL_139] (rows=255285 width=384)
+          Select Operator [SEL_139] (rows=264534 width=384)
             Output:["_col0","_col1"]
           <-Reducer 3 [SIMPLE_EDGE]
             SHUFFLE [RS_36]
-              Select Operator [SEL_35] (rows=255285 width=384)
+              Select Operator [SEL_35] (rows=264534 width=384)
                 Output:["_col1","_col2"]
-                Merge Join Operator [MERGEJOIN_120] (rows=255285 width=284)
+                Merge Join Operator [MERGEJOIN_120] (rows=264534 width=284)
                   Conds:RS_32._col1=RS_33._col1(Inner),Output:["_col2","_col6"]
                 <-Reducer 2 [ONE_TO_ONE_EDGE]
                   FORWARD [RS_32]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query85.q.out b/ql/src/test/results/clientpositive/perf/tez/query85.q.out
index 6bfc424..7e1bacb 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query85.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query85.q.out
@@ -216,7 +216,7 @@ Stage-0
                     PartitionCols:_col0
                     Group By Operator [GBY_49] (rows=288 width=353)
                       Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col4)","count(_col4)","sum(_col28)","count(_col28)","sum(_col27)","count(_col27)"],keys:_col37
-                      Merge Join Operator [MERGEJOIN_203] (rows=2912400 width=313)
+                      Merge Join Operator [MERGEJOIN_203] (rows=2996823 width=313)
                         Conds:RS_45._col2=RS_231._col0(Inner),Output:["_col4","_col27","_col28","_col37"]
                       <-Map 17 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_231]
@@ -230,16 +230,16 @@ Stage-0
                       <-Reducer 3 [SIMPLE_EDGE]
                         SHUFFLE [RS_45]
                           PartitionCols:_col2
-                          Filter Operator [FIL_43] (rows=2912400 width=377)
+                          Filter Operator [FIL_43] (rows=2996823 width=377)
                             predicate:(((_col30 and _col5) or (_col31 and _col6) or (_col32 and _col7)) and ((_col15 and _col16 and _col8) or (_col17 and _col18 and _col9) or (_col19 and _col20 and _col10)))
-                            Merge Join Operator [MERGEJOIN_202] (rows=10355208 width=377)
+                            Merge Join Operator [MERGEJOIN_202] (rows=10655376 width=377)
                               Conds:RS_40._col1, _col3=RS_41._col9, _col14(Inner),Output:["_col2","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col15","_col16","_col17","_col18","_col19","_col20","_col27","_col28","_col30","_col31","_col32","_col37"]
                             <-Reducer 13 [SIMPLE_EDGE]
                               SHUFFLE [RS_41]
                                 PartitionCols:_col9, _col14
-                                Select Operator [SEL_33] (rows=1056644 width=250)
+                                Select Operator [SEL_33] (rows=1086733 width=253)
                                   Output:["_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col14","_col15","_col16","_col18","_col19","_col20","_col25"]
-                                  Merge Join Operator [MERGEJOIN_201] (rows=1056644 width=250)
+                                  Merge Join Operator [MERGEJOIN_201] (rows=1086733 width=253)
                                     Conds:RS_30._col4=RS_228._col0(Inner),Output:["_col0","_col5","_col6","_col7","_col9","_col10","_col11","_col18","_col19","_col20","_col21","_col22","_col23","_col25"]
                                   <-Map 16 [SIMPLE_EDGE] vectorized
                                     SHUFFLE [RS_228]
@@ -253,7 +253,7 @@ Stage-0
                                   <-Reducer 12 [SIMPLE_EDGE]
                                     SHUFFLE [RS_30]
                                       PartitionCols:_col4
-                                      Merge Join Operator [MERGEJOIN_200] (rows=1056644 width=155)
+                                      Merge Join Operator [MERGEJOIN_200] (rows=1086733 width=158)
                                         Conds:RS_27._col1, _col13, _col14=RS_224._col0, _col1, _col2(Inner),Output:["_col0","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col18","_col19","_col20","_col21","_col22","_col23"]
                                       <-Map 15 [SIMPLE_EDGE] vectorized
                                         SHUFFLE [RS_224]
@@ -267,7 +267,7 @@ Stage-0
                                       <-Reducer 11 [SIMPLE_EDGE]
                                         SHUFFLE [RS_27]
                                           PartitionCols:_col1, _col13, _col14
-                                          Merge Join Operator [MERGEJOIN_199] (rows=1056644 width=312)
+                                          Merge Join Operator [MERGEJOIN_199] (rows=1071583 width=314)
                                             Conds:RS_24._col3=RS_225._col0(Inner),Output:["_col0","_col1","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col13","_col14"]
                                           <-Map 15 [SIMPLE_EDGE] vectorized
                                             SHUFFLE [RS_225]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query89.q.out b/ql/src/test/results/clientpositive/perf/tez/query89.q.out
index 6cd1183..b9fdaab 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query89.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query89.q.out
@@ -82,29 +82,29 @@ Stage-0
       File Output Operator [FS_112]
         Limit [LIM_111] (rows=100 width=801)
           Number of rows:100
-          Select Operator [SEL_110] (rows=4804228 width=801)
+          Select Operator [SEL_110] (rows=32461 width=801)
             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
           <-Reducer 6 [SIMPLE_EDGE] vectorized
             SHUFFLE [RS_109]
-              Select Operator [SEL_108] (rows=4804228 width=801)
+              Select Operator [SEL_108] (rows=32461 width=801)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
-                Filter Operator [FIL_107] (rows=4804228 width=689)
+                Filter Operator [FIL_107] (rows=32461 width=689)
                   predicate:CASE WHEN ((avg_window_0 <> 0)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END
-                  Select Operator [SEL_106] (rows=9608456 width=577)
+                  Select Operator [SEL_106] (rows=64922 width=577)
                     Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
-                    PTF Operator [PTF_105] (rows=9608456 width=577)
+                    PTF Operator [PTF_105] (rows=64922 width=577)
                       Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 ASC NULLS FIRST, _col0 ASC NULLS FIRST, _col4 ASC NULLS FIRST, _col5 ASC NULLS FIRST","partition by:":"_col2, _col0, _col4, _col5"}]
-                      Select Operator [SEL_104] (rows=9608456 width=577)
+                      Select Operator [SEL_104] (rows=64922 width=577)
                         Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
                       <-Reducer 5 [SIMPLE_EDGE] vectorized
                         SHUFFLE [RS_103]
                           PartitionCols:_col2, _col0, _col4, _col5
-                          Group By Operator [GBY_102] (rows=9608456 width=577)
+                          Group By Operator [GBY_102] (rows=64922 width=577)
                             Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4, KEY._col5
                           <-Reducer 4 [SIMPLE_EDGE]
                             SHUFFLE [RS_23]
                               PartitionCols:_col0, _col1, _col2, _col3, _col4, _col5
-                              Group By Operator [GBY_22] (rows=27308180 width=577)
+                              Group By Operator [GBY_22] (rows=3375944 width=577)
                                 Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col3)"],keys:_col5, _col6, _col7, _col9, _col11, _col12
                                 Merge Join Operator [MERGEJOIN_84] (rows=27308180 width=480)
                                   Conds:RS_18._col2=RS_101._col0(Inner),Output:["_col3","_col5","_col6","_col7","_col9","_col11","_col12"]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query91.q.out b/ql/src/test/results/clientpositive/perf/tez/query91.q.out
index 6bd534b..a92b741 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query91.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query91.q.out
@@ -92,18 +92,18 @@ Stage-0
     Stage-1
       Reducer 7 vectorized
       File Output Operator [FS_170]
-        Select Operator [SEL_169] (rows=9504 width=406)
+        Select Operator [SEL_169] (rows=2376 width=406)
           Output:["_col0","_col1","_col2","_col3"]
         <-Reducer 6 [SIMPLE_EDGE] vectorized
           SHUFFLE [RS_168]
-            Select Operator [SEL_167] (rows=9504 width=518)
+            Select Operator [SEL_167] (rows=2376 width=518)
               Output:["_col0","_col1","_col2","_col4"]
-              Group By Operator [GBY_166] (rows=9504 width=585)
+              Group By Operator [GBY_166] (rows=2376 width=585)
                 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3, KEY._col4
               <-Reducer 5 [SIMPLE_EDGE]
                 SHUFFLE [RS_42]
                   PartitionCols:_col0, _col1, _col2, _col3, _col4
-                  Group By Operator [GBY_41] (rows=9504 width=585)
+                  Group By Operator [GBY_41] (rows=2376 width=585)
                     Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col11)"],keys:_col5, _col6, _col14, _col15, _col16
                     Merge Join Operator [MERGEJOIN_144] (rows=231957 width=473)
                       Conds:RS_37._col2=RS_165._col0(Inner),Output:["_col5","_col6","_col11","_col14","_col15","_col16"]
@@ -161,7 +161,7 @@ Stage-0
                         <-Reducer 3 [SIMPLE_EDGE]
                           SHUFFLE [RS_34]
                             PartitionCols:_col0
-                            Merge Join Operator [MERGEJOIN_140] (rows=213205 width=183)
+                            Merge Join Operator [MERGEJOIN_140] (rows=228944 width=183)
                               Conds:RS_31._col3=RS_153._col0(Inner),Output:["_col0","_col2","_col5","_col6"]
                             <-Map 9 [SIMPLE_EDGE] vectorized
                               SHUFFLE [RS_153]
@@ -175,7 +175,7 @@ Stage-0
                             <-Reducer 2 [SIMPLE_EDGE]
                               SHUFFLE [RS_31]
                                 PartitionCols:_col3
-                                Merge Join Operator [MERGEJOIN_139] (rows=1066023 width=187)
+                                Merge Join Operator [MERGEJOIN_139] (rows=1144719 width=187)
                                   Conds:RS_147._col1=RS_150._col0(Inner),Output:["_col0","_col2","_col3","_col5","_col6"]
                                 <-Map 1 [SIMPLE_EDGE] vectorized
                                   SHUFFLE [RS_147]
diff --git a/ql/src/test/results/clientpositive/perf/tez/query92.q.out b/ql/src/test/results/clientpositive/perf/tez/query92.q.out
index 223a605..0a0d54e 100644
--- a/ql/src/test/results/clientpositive/perf/tez/query92.q.out
+++ b/ql/src/test/results/clientpositive/perf/tez/query92.q.out
@@ -145,16 +145,16 @@ Stage-0
                   <-Reducer 7 [ONE_TO_ONE_EDGE] vectorized
                     FORWARD [RS_125]
                       PartitionCols:_col0
-                      Select Operator [SEL_124] (rows=6951 width=116)
+                      Select Operator [SEL_124] (rows=6950 width=116)
                         Output:["_col0","_col1"]
-                        Filter Operator [FIL_123] (rows=6951 width=124)
+                        Filter Operator [FIL_123] (rows=6950 width=124)
                           predicate:CAST( (1.3 * (_col1 / _col2)) AS decimal(14,7)) is not null
-                          Group By Operator [GBY_122] (rows=6951 width=124)
+                          Group By Operator [GBY_122] (rows=6950 width=124)
                             Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0
                           <-Reducer 6 [SIMPLE_EDGE]
                             SHUFFLE [RS_20]
                               PartitionCols:_col0
-                              Group By Operator [GBY_19] (rows=55608 width=124)
+                              Group By Operator [GBY_19] (rows=55600 width=124)
                                 Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","count(_col2)"],keys:_col1
                                 Merge Join Operator [MERGEJOIN_102] (rows=15995224 width=115)
                                   Conds:RS_117._col0=RS_121._col0(Inner),Output:["_col1","_col2"]
diff --git a/ql/src/test/results/clientpositive/ppd_gby_join.q.out b/ql/src/test/results/clientpositive/ppd_gby_join.q.out
index eba3c9b..2074077 100644
--- a/ql/src/test/results/clientpositive/ppd_gby_join.q.out
+++ b/ql/src/test/results/clientpositive/ppd_gby_join.q.out
@@ -71,14 +71,14 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0
-          Statistics: Num rows: 36 Data size: 3132 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 56 Data size: 4872 Basic stats: COMPLETE Column stats: COMPLETE
           Group By Operator
             aggregations: count()
             keys: _col0 (type: string)
             minReductionHashAggr: 0.99
             mode: hash
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 18 Data size: 1710 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 23 Data size: 2185 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
               table:
@@ -94,7 +94,7 @@ STAGE PLANS:
               key expressions: _col0 (type: string)
               sort order: +
               Map-reduce partition columns: _col0 (type: string)
-              Statistics: Num rows: 18 Data size: 1710 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 23 Data size: 2185 Basic stats: COMPLETE Column stats: COMPLETE
               value expressions: _col1 (type: bigint)
       Execution mode: vectorized
       Reduce Operator Tree:
@@ -103,10 +103,10 @@ STAGE PLANS:
           keys: KEY._col0 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 18 Data size: 1710 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 23 Data size: 2185 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 18 Data size: 1710 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 23 Data size: 2185 Basic stats: COMPLETE Column stats: COMPLETE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -342,14 +342,14 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0
-          Statistics: Num rows: 36 Data size: 3132 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 56 Data size: 4872 Basic stats: COMPLETE Column stats: COMPLETE
           Group By Operator
             aggregations: count()
             keys: _col0 (type: string)
             minReductionHashAggr: 0.99
             mode: hash
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 18 Data size: 1710 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 23 Data size: 2185 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
               table:
@@ -365,7 +365,7 @@ STAGE PLANS:
               key expressions: _col0 (type: string)
               sort order: +
               Map-reduce partition columns: _col0 (type: string)
-              Statistics: Num rows: 18 Data size: 1710 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 23 Data size: 2185 Basic stats: COMPLETE Column stats: COMPLETE
               value expressions: _col1 (type: bigint)
       Execution mode: vectorized
       Reduce Operator Tree:
@@ -374,10 +374,10 @@ STAGE PLANS:
           keys: KEY._col0 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 18 Data size: 1710 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 23 Data size: 2185 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 18 Data size: 1710 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 23 Data size: 2185 Basic stats: COMPLETE Column stats: COMPLETE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/ppd_join.q.out b/ql/src/test/results/clientpositive/ppd_join.q.out
index c458677..282924c 100644
--- a/ql/src/test/results/clientpositive/ppd_join.q.out
+++ b/ql/src/test/results/clientpositive/ppd_join.q.out
@@ -69,14 +69,14 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col2
-          Statistics: Num rows: 36 Data size: 6408 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 56 Data size: 9968 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col2 (type: string)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 36 Data size: 6408 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 56 Data size: 9968 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 36 Data size: 6408 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 56 Data size: 9968 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -597,14 +597,14 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col2
-          Statistics: Num rows: 36 Data size: 6408 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 56 Data size: 9968 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col2 (type: string)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 36 Data size: 6408 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 56 Data size: 9968 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 36 Data size: 6408 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 56 Data size: 9968 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/ppd_join2.q.out b/ql/src/test/results/clientpositive/ppd_join2.q.out
index cf3457e..8a7d6f7 100644
--- a/ql/src/test/results/clientpositive/ppd_join2.q.out
+++ b/ql/src/test/results/clientpositive/ppd_join2.q.out
@@ -77,10 +77,10 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 166 Data size: 59096 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 262 Data size: 93272 Basic stats: COMPLETE Column stats: COMPLETE
           Filter Operator
             predicate: ((_col0 <> '10') or (_col2 <> '10')) (type: boolean)
-            Statistics: Num rows: 166 Data size: 59096 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 262 Data size: 93272 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
               table:
@@ -96,7 +96,7 @@ STAGE PLANS:
               key expressions: _col3 (type: string)
               sort order: +
               Map-reduce partition columns: _col3 (type: string)
-              Statistics: Num rows: 166 Data size: 59096 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 262 Data size: 93272 Basic stats: COMPLETE Column stats: COMPLETE
               value expressions: _col1 (type: string), _col2 (type: string)
           TableScan
             alias: src
@@ -122,14 +122,14 @@ STAGE PLANS:
             0 _col3 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col1, _col2
-          Statistics: Num rows: 270 Data size: 48060 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 426 Data size: 75828 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col2 (type: string), _col1 (type: string)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 270 Data size: 48060 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 426 Data size: 75828 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 270 Data size: 48060 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 426 Data size: 75828 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1764,10 +1764,10 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3
-          Statistics: Num rows: 166 Data size: 59096 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 262 Data size: 93272 Basic stats: COMPLETE Column stats: COMPLETE
           Filter Operator
             predicate: ((_col0 <> '10') or (_col2 <> '10')) (type: boolean)
-            Statistics: Num rows: 166 Data size: 59096 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 262 Data size: 93272 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
               table:
@@ -1783,7 +1783,7 @@ STAGE PLANS:
               key expressions: _col3 (type: string)
               sort order: +
               Map-reduce partition columns: _col3 (type: string)
-              Statistics: Num rows: 166 Data size: 59096 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 262 Data size: 93272 Basic stats: COMPLETE Column stats: COMPLETE
               value expressions: _col1 (type: string), _col2 (type: string)
           TableScan
             alias: src
@@ -1809,14 +1809,14 @@ STAGE PLANS:
             0 _col3 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col1, _col2
-          Statistics: Num rows: 270 Data size: 48060 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 426 Data size: 75828 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col2 (type: string), _col1 (type: string)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 270 Data size: 48060 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 426 Data size: 75828 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 270 Data size: 48060 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 426 Data size: 75828 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/ppd_join3.q.out b/ql/src/test/results/clientpositive/ppd_join3.q.out
index a7820aa..950ac90 100644
--- a/ql/src/test/results/clientpositive/ppd_join3.q.out
+++ b/ql/src/test/results/clientpositive/ppd_join3.q.out
@@ -75,7 +75,7 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col1
-          Statistics: Num rows: 55 Data size: 4785 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 86 Data size: 7482 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
             table:
@@ -91,7 +91,7 @@ STAGE PLANS:
               key expressions: _col1 (type: string)
               sort order: +
               Map-reduce partition columns: _col1 (type: string)
-              Statistics: Num rows: 55 Data size: 4785 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 86 Data size: 7482 Basic stats: COMPLETE Column stats: COMPLETE
           TableScan
             alias: src
             filterExpr: ((key > '0') and (key < '400') and (key <> '4') and (key <> '1') and (key <> '12') and (key <> '11') and (key <> '13')) (type: boolean)
@@ -117,17 +117,17 @@ STAGE PLANS:
             0 _col1 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col1, _col2, _col3
-          Statistics: Num rows: 55 Data size: 14575 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 135 Data size: 35775 Basic stats: COMPLETE Column stats: COMPLETE
           Filter Operator
             predicate: ((_col2 > '10') or (_col1 <> '10')) (type: boolean)
-            Statistics: Num rows: 55 Data size: 14575 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 135 Data size: 35775 Basic stats: COMPLETE Column stats: COMPLETE
             Select Operator
               expressions: _col1 (type: string), _col3 (type: string)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 55 Data size: 9790 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 135 Data size: 24030 Basic stats: COMPLETE Column stats: COMPLETE
               File Output Operator
                 compressed: false
-                Statistics: Num rows: 55 Data size: 9790 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 135 Data size: 24030 Basic stats: COMPLETE Column stats: COMPLETE
                 table:
                     input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                     output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -1817,7 +1817,7 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col1
-          Statistics: Num rows: 55 Data size: 4785 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 86 Data size: 7482 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
             table:
@@ -1833,7 +1833,7 @@ STAGE PLANS:
               key expressions: _col1 (type: string)
               sort order: +
               Map-reduce partition columns: _col1 (type: string)
-              Statistics: Num rows: 55 Data size: 4785 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 86 Data size: 7482 Basic stats: COMPLETE Column stats: COMPLETE
           TableScan
             alias: src
             filterExpr: ((key > '0') and (key < '400') and (key <> '4') and (key <> '1') and (key <> '12') and (key <> '11') and (key <> '13')) (type: boolean)
@@ -1859,17 +1859,17 @@ STAGE PLANS:
             0 _col1 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col1, _col2, _col3
-          Statistics: Num rows: 55 Data size: 14575 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 135 Data size: 35775 Basic stats: COMPLETE Column stats: COMPLETE
           Filter Operator
             predicate: ((_col2 > '10') or (_col1 <> '10')) (type: boolean)
-            Statistics: Num rows: 55 Data size: 14575 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 135 Data size: 35775 Basic stats: COMPLETE Column stats: COMPLETE
             Select Operator
               expressions: _col1 (type: string), _col3 (type: string)
               outputColumnNames: _col0, _col1
-              Statistics: Num rows: 55 Data size: 9790 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 135 Data size: 24030 Basic stats: COMPLETE Column stats: COMPLETE
               File Output Operator
                 compressed: false
-                Statistics: Num rows: 55 Data size: 9790 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 135 Data size: 24030 Basic stats: COMPLETE Column stats: COMPLETE
                 table:
                     input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                     output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/ppd_outer_join4.q.out b/ql/src/test/results/clientpositive/ppd_outer_join4.q.out
index f0fe2c2..7c90cdd 100644
--- a/ql/src/test/results/clientpositive/ppd_outer_join4.q.out
+++ b/ql/src/test/results/clientpositive/ppd_outer_join4.q.out
@@ -76,7 +76,7 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 55 Data size: 14575 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 86 Data size: 22790 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
             table:
@@ -92,7 +92,7 @@ STAGE PLANS:
               key expressions: _col0 (type: string)
               sort order: +
               Map-reduce partition columns: _col0 (type: string)
-              Statistics: Num rows: 55 Data size: 14575 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 86 Data size: 22790 Basic stats: COMPLETE Column stats: COMPLETE
               value expressions: _col1 (type: string), _col2 (type: string)
           TableScan
             alias: b
@@ -119,14 +119,14 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4
-          Statistics: Num rows: 55 Data size: 24365 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 135 Data size: 59805 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col4 (type: string), _col2 (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4
-            Statistics: Num rows: 55 Data size: 24365 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 135 Data size: 59805 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 55 Data size: 24365 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 135 Data size: 59805 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -472,7 +472,7 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 55 Data size: 14575 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 86 Data size: 22790 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
             table:
@@ -488,7 +488,7 @@ STAGE PLANS:
               key expressions: _col0 (type: string)
               sort order: +
               Map-reduce partition columns: _col0 (type: string)
-              Statistics: Num rows: 55 Data size: 14575 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 86 Data size: 22790 Basic stats: COMPLETE Column stats: COMPLETE
               value expressions: _col1 (type: string), _col2 (type: string)
           TableScan
             alias: b
@@ -515,14 +515,14 @@ STAGE PLANS:
             0 _col0 (type: string)
             1 _col0 (type: string)
           outputColumnNames: _col0, _col1, _col2, _col3, _col4
-          Statistics: Num rows: 55 Data size: 24365 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 135 Data size: 59805 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col4 (type: string), _col2 (type: string)
             outputColumnNames: _col0, _col1, _col2, _col3, _col4
-            Statistics: Num rows: 55 Data size: 24365 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 135 Data size: 59805 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 55 Data size: 24365 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 135 Data size: 59805 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out b/ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out
index e5e2568..24640b5 100644
--- a/ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out
+++ b/ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out
@@ -1252,11 +1252,11 @@ Stage-0
     Stage-1
       Reducer 2
       File Output Operator [FS_17]
-        Select Operator [SEL_16] (rows=30 width=101)
+        Select Operator [SEL_16] (rows=40 width=101)
           Output:["_col0","_col1","_col2","_col3","_col4"]
-          Filter Operator [FIL_13] (rows=30 width=105)
+          Filter Operator [FIL_13] (rows=40 width=105)
             predicate:(((_col1 > 0) or (_col6 >= 0)) and ((_col1 > 0) or _col7) and ((_col1 + _col4) = 2))
-            Join Operator [JOIN_12] (rows=60 width=104)
+            Join Operator [JOIN_12] (rows=81 width=104)
               Output:["_col1","_col2","_col3","_col4","_col6","_col7"],condition map:[{"":"{\"type\":\"Inner\",\"left\":0,\"right\":1}"},{"":"{\"type\":\"Inner\",\"left\":0,\"right\":2}"}],keys:{"0":"_col0","1":"_col0","2":"_col0"}
             <-Map 1 [PARTITION-LEVEL SORT]
               PARTITION-LEVEL SORT [RS_9]
@@ -1313,11 +1313,11 @@ Stage-0
     Stage-1
       Reducer 2
       File Output Operator [FS_17]
-        Select Operator [SEL_16] (rows=30 width=101)
+        Select Operator [SEL_16] (rows=40 width=101)
           Output:["_col0","_col1","_col2","_col3","_col4"]
-          Filter Operator [FIL_13] (rows=30 width=105)
+          Filter Operator [FIL_13] (rows=40 width=105)
             predicate:(((_col1 > 0) or (_col6 >= 0)) and ((_col1 > 0) or _col7) and ((_col1 + _col4) = 2))
-            Join Operator [JOIN_12] (rows=60 width=104)
+            Join Operator [JOIN_12] (rows=81 width=104)
               Output:["_col1","_col2","_col3","_col4","_col6","_col7"],condition map:[{"":"{\"type\":\"Inner\",\"left\":0,\"right\":1}"},{"":"{\"type\":\"Inner\",\"left\":0,\"right\":2}"}],keys:{"0":"_col0","1":"_col0","2":"_col0"}
             <-Map 1 [PARTITION-LEVEL SORT]
               PARTITION-LEVEL SORT [RS_9]
@@ -1698,9 +1698,9 @@ Stage-0
     Stage-1
       Reducer 2
       File Output Operator [FS_18]
-        Select Operator [SEL_17] (rows=10 width=93)
+        Select Operator [SEL_17] (rows=14 width=93)
           Output:["_col0","_col1","_col2"]
-          Join Operator [JOIN_16] (rows=10 width=93)
+          Join Operator [JOIN_16] (rows=14 width=93)
             Output:["_col0","_col1","_col2"],condition map:[{"":"{\"type\":\"Left Semi\",\"left\":0,\"right\":1}"},{"":"{\"type\":\"Left Semi\",\"left\":0,\"right\":2}"}],keys:{"0":"_col0","1":"_col0","2":"_col0"}
           <-Map 1 [PARTITION-LEVEL SORT]
             PARTITION-LEVEL SORT [RS_13]
@@ -2119,7 +2119,7 @@ Stage-0
     Stage-1
       Reducer 2
       File Output Operator [FS_12]
-        Join Operator [JOIN_10] (rows=83 width=178)
+        Join Operator [JOIN_10] (rows=131 width=178)
           Output:["_col0","_col1"],condition map:[{"":"{\"type\":\"Left Semi\",\"left\":0,\"right\":1}"}],keys:{"0":"_col0, _col1","1":"_col0, _col1"}
         <-Map 1 [PARTITION-LEVEL SORT]
           PARTITION-LEVEL SORT [RS_8]
@@ -2175,7 +2175,7 @@ Stage-0
     Stage-1
       Reducer 2
       File Output Operator [FS_12]
-        Join Operator [JOIN_10] (rows=83 width=178)
+        Join Operator [JOIN_10] (rows=131 width=178)
           Output:["_col0","_col1"],condition map:[{"":"{\"type\":\"Left Semi\",\"left\":0,\"right\":1}"}],keys:{"0":"_col0, _col1","1":"_col0, _col1"}
         <-Map 1 [PARTITION-LEVEL SORT]
           PARTITION-LEVEL SORT [RS_8]
diff --git a/ql/src/test/results/clientpositive/subquery_exists.q.out b/ql/src/test/results/clientpositive/subquery_exists.q.out
index 658a445..9a65531 100644
--- a/ql/src/test/results/clientpositive/subquery_exists.q.out
+++ b/ql/src/test/results/clientpositive/subquery_exists.q.out
@@ -74,10 +74,10 @@ STAGE PLANS:
             0 _col0 (type: string), _col1 (type: string)
             1 _col0 (type: string), _col1 (type: string)
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out b/ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out
index 462b22d..d567dc1 100644
--- a/ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out
+++ b/ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out
@@ -175,10 +175,10 @@ STAGE PLANS:
             0 _col0 (type: string), _col1 (type: string)
             1 _col0 (type: string), _col1 (type: string)
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -266,10 +266,10 @@ STAGE PLANS:
             0 _col0 (type: string), _col1 (type: string)
             1 _col0 (type: string), _col1 (type: string)
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
           File Output Operator
             compressed: false
-            Statistics: Num rows: 83 Data size: 14774 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 131 Data size: 23318 Basic stats: COMPLETE Column stats: COMPLETE
             table:
                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
index 7f3ad53..ff90824 100644
--- a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
@@ -48,11 +48,11 @@ Stage-0
     Stage-1
       Reducer 3
       File Output Operator [FS_12]
-        Select Operator [SEL_11] (rows=1019/10 width=484)
+        Select Operator [SEL_11] (rows=2048/10 width=552)
           Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
         <-Reducer 2 [SIMPLE_EDGE]
           SHUFFLE [RS_10]
-            Merge Join Operator [MERGEJOIN_27] (rows=1019/10 width=484)
+            Merge Join Operator [MERGEJOIN_27] (rows=2048/10 width=552)
               Conds:RS_6._col2=RS_7._col2(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
             <-Map 1 [SIMPLE_EDGE]
               SHUFFLE [RS_6]
@@ -151,7 +151,7 @@ Stage-0
           Output:["_col0"],aggregations:["count()"]
         <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
           PARTITION_ONLY_SHUFFLE [RS_10]
-            Merge Join Operator [MERGEJOIN_28] (rows=1019/10 width=8)
+            Merge Join Operator [MERGEJOIN_28] (rows=2048/10 width=8)
               Conds:RS_6._col0=RS_7._col0(Inner)
             <-Map 1 [SIMPLE_EDGE]
               SHUFFLE [RS_6]
@@ -244,16 +244,16 @@ Stage-0
     Stage-1
       Reducer 4
       File Output Operator [FS_15]
-        Select Operator [SEL_14] (rows=1019/5 width=10)
+        Select Operator [SEL_14] (rows=1366/5 width=11)
           Output:["_col0","_col1"]
         <-Reducer 3 [SIMPLE_EDGE]
           SHUFFLE [RS_13]
-            Group By Operator [GBY_11] (rows=1019/5 width=10)
+            Group By Operator [GBY_11] (rows=1366/5 width=11)
               Output:["_col0","_col1"],aggregations:["count()"],keys:KEY._col0
             <-Reducer 2 [SIMPLE_EDGE]
               SHUFFLE [RS_10]
                 PartitionCols:_col0
-                Merge Join Operator [MERGEJOIN_30] (rows=1019/10 width=2)
+                Merge Join Operator [MERGEJOIN_30] (rows=2048/10 width=3)
                   Conds:RS_6._col1=RS_7._col0(Inner),Output:["_col0"]
                 <-Map 1 [SIMPLE_EDGE]
                   SHUFFLE [RS_6]
diff --git a/ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_1.q.out b/ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_1.q.out
index afabf4b..d9078b5 100644
--- a/ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_1.q.out
@@ -312,7 +312,7 @@ STAGE PLANS:
                           1 _col0 (type: int)
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 13785 Data size: 110280 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 18464 Data size: 147712 Basic stats: COMPLETE Column stats: COMPLETE
                         Group By Operator
                           aggregations: count()
                           minReductionHashAggr: 0.99
@@ -434,7 +434,7 @@ STAGE PLANS:
                           1 _col0 (type: int)
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 13785 Data size: 110280 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 18464 Data size: 147712 Basic stats: COMPLETE Column stats: COMPLETE
                         HybridGraceHashJoin: true
                         Group By Operator
                           aggregations: count()
@@ -553,7 +553,7 @@ STAGE PLANS:
                         1 _col0 (type: int)
                       input vertices:
                         1 Map 3
-                      Statistics: Num rows: 18466 Data size: 147728 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 21560 Data size: 172480 Basic stats: COMPLETE Column stats: COMPLETE
                       Group By Operator
                         aggregations: count()
                         minReductionHashAggr: 0.99
@@ -671,7 +671,7 @@ STAGE PLANS:
                         1 _col0 (type: int)
                       input vertices:
                         1 Map 3
-                      Statistics: Num rows: 18466 Data size: 147728 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 21560 Data size: 172480 Basic stats: COMPLETE Column stats: COMPLETE
                       HybridGraceHashJoin: true
                       Group By Operator
                         aggregations: count()
diff --git a/ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_2.q.out b/ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_2.q.out
index 9ba9a1f..8e9bd05 100644
--- a/ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_2.q.out
+++ b/ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_2.q.out
@@ -1383,7 +1383,7 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1
                       input vertices:
                         0 Map 1
-                      Statistics: Num rows: 4 Data size: 700 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 12 Data size: 2100 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -1393,7 +1393,7 @@ STAGE PLANS:
                         outputColumnNames: _col1
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 4 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 18 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
                         Map Join Operator
                           condition map:
                                Inner Join 0 to 1
@@ -1403,7 +1403,7 @@ STAGE PLANS:
                           outputColumnNames: _col1
                           input vertices:
                             1 Map 5
-                          Statistics: Num rows: 4 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 114 Data size: 10146 Basic stats: COMPLETE Column stats: COMPLETE
                           Map Join Operator
                             condition map:
                                  Inner Join 0 to 1
@@ -1412,10 +1412,10 @@ STAGE PLANS:
                               1 value (type: string)
                             input vertices:
                               1 Map 6
-                            Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 185 Data size: 1480 Basic stats: COMPLETE Column stats: COMPLETE
                             Group By Operator
                               aggregations: count()
-                              minReductionHashAggr: 0.75
+                              minReductionHashAggr: 0.99
                               mode: hash
                               outputColumnNames: _col0
                               Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
@@ -1609,7 +1609,7 @@ STAGE PLANS:
                       outputColumnNames: _col0, _col1
                       input vertices:
                         0 Map 1
-                      Statistics: Num rows: 4 Data size: 700 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 12 Data size: 2100 Basic stats: COMPLETE Column stats: COMPLETE
                       HybridGraceHashJoin: true
                       Map Join Operator
                         condition map:
@@ -1620,7 +1620,7 @@ STAGE PLANS:
                         outputColumnNames: _col1
                         input vertices:
                           1 Map 4
-                        Statistics: Num rows: 4 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 18 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
                         HybridGraceHashJoin: true
                         Map Join Operator
                           condition map:
@@ -1631,7 +1631,7 @@ STAGE PLANS:
                           outputColumnNames: _col1
                           input vertices:
                             1 Map 5
-                          Statistics: Num rows: 4 Data size: 356 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 114 Data size: 10146 Basic stats: COMPLETE Column stats: COMPLETE
                           HybridGraceHashJoin: true
                           Map Join Operator
                             condition map:
@@ -1641,11 +1641,11 @@ STAGE PLANS:
                               1 value (type: string)
                             input vertices:
                               1 Map 6
-                            Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 185 Data size: 1480 Basic stats: COMPLETE Column stats: COMPLETE
                             HybridGraceHashJoin: true
                             Group By Operator
                               aggregations: count()
-                              minReductionHashAggr: 0.75
+                              minReductionHashAggr: 0.99
                               mode: hash
                               outputColumnNames: _col0
                               Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
diff --git a/ql/src/test/results/clientpositive/vector_outer_join3.q.out b/ql/src/test/results/clientpositive/vector_outer_join3.q.out
index f88492d..0640aee 100644
--- a/ql/src/test/results/clientpositive/vector_outer_join3.q.out
+++ b/ql/src/test/results/clientpositive/vector_outer_join3.q.out
@@ -336,7 +336,7 @@ left outer join small_alltypesorc_a_n1 hd
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@small_alltypesorc_a_n1
 #### A masked pattern was here ####
-{"CBOPlan":"{\n  \"rels\": [\n    {\n      \"id\": \"0\",\n      \"relOp\": \"org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan\",\n      \"table\": [\n        \"default\",\n        \"small_alltypesorc_a_n1\"\n      ],\n      \"table:alias\": \"c\",\n      \"inputs\": [],\n      \"rowCount\": 20.0,\n      \"avgRowSize\": 26.75,\n      \"rowType\": [\n        {\n          \"type\": \"TINYINT\",\n          \"nullable\": true,\n          \"name\": \"ctinyint\"\n         [...]
+{"CBOPlan":"{\n  \"rels\": [\n    {\n      \"id\": \"0\",\n      \"relOp\": \"org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan\",\n      \"table\": [\n        \"default\",\n        \"small_alltypesorc_a_n1\"\n      ],\n      \"table:alias\": \"c\",\n      \"inputs\": [],\n      \"rowCount\": 20.0,\n      \"avgRowSize\": 26.75,\n      \"rowType\": [\n        {\n          \"type\": \"TINYINT\",\n          \"nullable\": true,\n          \"name\": \"ctinyint\"\n         [...]
 PREHOOK: query: select count(*) from (select c.cstring1
 from small_alltypesorc_a_n1 c
 left outer join small_alltypesorc_a_n1 cd