hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pxi...@apache.org
Subject hive git commit: HIVE-8869 : RowSchema not updated for some ops when columns are pruned (Jesús Camacho Rodríguez via Ashutosh Chauhan)
Date Tue, 11 Aug 2015 22:20:15 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1.0 822ef79cd -> d3919332a


HIVE-8869 : RowSchema not updated for some ops when columns are pruned (Jesús Camacho Rodríguez
via Ashutosh Chauhan)

git-svn-id: https://svn.apache.org/repos/asf/hive/trunk@1640227 13f79535-47bb-0310-9956-ffa450edef68


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

Branch: refs/heads/branch-1.0
Commit: d3919332a0b14d9f8d5ab0d996525cc48f519ce0
Parents: 822ef79
Author: Ashutosh Chauhan <hashutosh@apache.org>
Authored: Mon Nov 17 21:19:05 2014 +0000
Committer: Pengcheng Xiong <pxiong@apache.org>
Committed: Tue Aug 11 15:20:09 2015 -0700

----------------------------------------------------------------------
 .../hive/ql/optimizer/ColumnPrunerProcCtx.java  | 14 +++-
 .../ql/optimizer/ColumnPrunerProcFactory.java   | 20 ++++--
 .../clientnegative/udf_assert_true.q.out        | 12 ++--
 .../clientnegative/udf_assert_true2.q.out       |  6 +-
 .../results/clientpositive/lateral_view.q.out   | 68 ++++++++++----------
 .../clientpositive/lateral_view_noalias.q.out   | 22 +++----
 .../results/clientpositive/udtf_stack.q.out     | 12 ++--
 7 files changed, 87 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/d3919332/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcCtx.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcCtx.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcCtx.java
index fee9bcf..5d848a1 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcCtx.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcCtx.java
@@ -23,6 +23,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.hadoop.hive.ql.exec.ColumnInfo;
 import org.apache.hadoop.hive.ql.exec.CommonJoinOperator;
 import org.apache.hadoop.hive.ql.exec.Operator;
 import org.apache.hadoop.hive.ql.exec.SelectOperator;
@@ -128,9 +129,16 @@ public class ColumnPrunerProcCtx implements NodeProcessorCtx {
   public List<String> getColsFromSelectExpr(SelectOperator op) {
     List<String> cols = new ArrayList<String>();
     SelectDesc conf = op.getConf();
-    List<ExprNodeDesc> exprList = conf.getColList();
-    for (ExprNodeDesc expr : exprList) {
-      cols = Utilities.mergeUniqElems(cols, expr.getCols());
+    if(conf.isSelStarNoCompute()) {
+      for (ColumnInfo colInfo : op.getSchema().getSignature()) {
+        cols.add(colInfo.getInternalName());
+      }
+    }
+    else {
+      List<ExprNodeDesc> exprList = conf.getColList();
+        for (ExprNodeDesc expr : exprList) {
+          cols = Utilities.mergeUniqElems(cols, expr.getCols());
+        }
     }
     return cols;
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/d3919332/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcFactory.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcFactory.java
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcFactory.java
index 2dc66f7..afd1738 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ColumnPrunerProcFactory.java
@@ -386,12 +386,14 @@ public final class ColumnPrunerProcFactory {
         scanOp.setNeededColumnIDs(null);
         return null;
       }
+
       cols = cols == null ? new ArrayList<String>() : cols;
 
       cppCtx.getPrunedColLists().put((Operator<? extends OperatorDesc>) nd,
           cols);
       RowResolver inputRR = cppCtx.getOpToParseCtxMap().get(scanOp).getRowResolver();
       setupNeededColumns(scanOp, inputRR, cols);
+
       return null;
     }
   }
@@ -569,7 +571,7 @@ public final class ColumnPrunerProcFactory {
       // following SEL will do CP for columns from UDTF, not adding SEL in here
       newColNames.addAll(outputCols.subList(numSelColumns, outputCols.size()));
       op.getConf().setOutputInternalColNames(newColNames);
-
+      pruneOperator(ctx, op, newColNames);
       cppCtx.getPrunedColLists().put(op, colsAfterReplacement);
       return null;
     }
@@ -607,6 +609,12 @@ public final class ColumnPrunerProcFactory {
         ((SelectDesc)select.getConf()).setSelStarNoCompute(false);
         ((SelectDesc)select.getConf()).setColList(colList);
         ((SelectDesc)select.getConf()).setOutputColumnNames(outputColNames);
+        pruneOperator(ctx, select, outputColNames);
+        
+        Operator<?> udtfPath = op.getChildOperators().get(LateralViewJoinOperator.UDTF_TAG);
+        List<String> lvFCols = new ArrayList<String>(cppCtx.getPrunedColLists().get(udtfPath));
+        lvFCols = Utilities.mergeUniqElems(lvFCols, outputColNames);
+        pruneOperator(ctx, op, lvFCols);
       }
       return null;
     }
@@ -874,12 +882,16 @@ public final class ColumnPrunerProcFactory {
     RowSchema inputSchema = op.getSchema();
     if (inputSchema != null) {
       ArrayList<ColumnInfo> rs = new ArrayList<ColumnInfo>();
-      ArrayList<ColumnInfo> inputCols = inputSchema.getSignature();
-      for (ColumnInfo i: inputCols) {
-        if (cols.contains(i.getInternalName())) {
+      RowResolver oldRR = ((ColumnPrunerProcCtx)ctx).getOpToParseCtxMap().get(op).getRowResolver();
+      RowResolver newRR = new RowResolver();
+      for(ColumnInfo i : oldRR.getRowSchema().getSignature()) {
+        if ( cols.contains(i.getInternalName())) {
+          String[] nm = oldRR.reverseLookup(i.getInternalName());
+          newRR.put(nm[0], nm[1], i);
           rs.add(i);
         }
       }
+      ((ColumnPrunerProcCtx)ctx).getOpToParseCtxMap().get(op).setRowResolver(newRR);
       op.getSchema().setSignature(rs);
     }
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/d3919332/ql/src/test/results/clientnegative/udf_assert_true.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/udf_assert_true.q.out b/ql/src/test/results/clientnegative/udf_assert_true.q.out
index 4a5b30d..819d723 100644
--- a/ql/src/test/results/clientnegative/udf_assert_true.q.out
+++ b/ql/src/test/results/clientnegative/udf_assert_true.q.out
@@ -21,10 +21,10 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5
-                  Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: assert_true((_col5 > 0)) (type: void)
                     outputColumnNames: _col0
@@ -48,7 +48,7 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col5
-                    Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: assert_true((_col5 > 0)) (type: void)
                       outputColumnNames: _col0
@@ -98,10 +98,10 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5
-                  Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: assert_true((_col5 < 2)) (type: void)
                     outputColumnNames: _col0
@@ -125,7 +125,7 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col5
-                    Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: assert_true((_col5 < 2)) (type: void)
                       outputColumnNames: _col0

http://git-wip-us.apache.org/repos/asf/hive/blob/d3919332/ql/src/test/results/clientnegative/udf_assert_true2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/udf_assert_true2.q.out b/ql/src/test/results/clientnegative/udf_assert_true2.q.out
index 3684a3f..9760d0d 100644
--- a/ql/src/test/results/clientnegative/udf_assert_true2.q.out
+++ b/ql/src/test/results/clientnegative/udf_assert_true2.q.out
@@ -16,10 +16,10 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5
-                  Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: (1 + assert_true((_col5 < 2))) (type: double)
                     outputColumnNames: _col0
@@ -43,7 +43,7 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col5
-                    Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: (1 + assert_true((_col5 < 2))) (type: double)
                       outputColumnNames: _col0

http://git-wip-us.apache.org/repos/asf/hive/blob/d3919332/ql/src/test/results/clientpositive/lateral_view.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/lateral_view.q.out b/ql/src/test/results/clientpositive/lateral_view.q.out
index 25ed62f..ce20041 100644
--- a/ql/src/test/results/clientpositive/lateral_view.q.out
+++ b/ql/src/test/results/clientpositive/lateral_view.q.out
@@ -132,14 +132,14 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5
-                  Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: _col5 (type: int)
                     outputColumnNames: _col0
-                    Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Limit
                       Number of rows: 3
                       Statistics: Num rows: 3 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
@@ -159,11 +159,11 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col5
-                    Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: _col5 (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE
Column stats: COMPLETE
+                      Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                       Limit
                         Number of rows: 3
                         Statistics: Num rows: 3 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
@@ -199,19 +199,19 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5
-                  Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Lateral View Forward
-                    Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: _col5 (type: int)
                       outputColumnNames: _col5
-                      Statistics: Num rows: 1000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                      Statistics: Num rows: 1000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                       Lateral View Join Operator
                         outputColumnNames: _col5, _col6
-                        Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                        Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                         Select Operator
                           expressions: _col5 (type: int), _col6 (type: string)
                           outputColumnNames: _col0, _col1
@@ -235,7 +235,7 @@ STAGE PLANS:
                         function name: explode
                         Lateral View Join Operator
                           outputColumnNames: _col5, _col6
-                          Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                          Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                           Select Operator
                             expressions: _col5 (type: int), _col6 (type: string)
                             outputColumnNames: _col0, _col1
@@ -259,16 +259,16 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col5
-                    Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Lateral View Forward
-                      Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE
Column stats: COMPLETE
+                      Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                       Select Operator
                         expressions: _col5 (type: int)
                         outputColumnNames: _col5
-                        Statistics: Num rows: 1000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                        Statistics: Num rows: 1000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                         Lateral View Join Operator
                           outputColumnNames: _col5, _col6
-                          Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                          Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                           Select Operator
                             expressions: _col5 (type: int), _col6 (type: string)
                             outputColumnNames: _col0, _col1
@@ -292,7 +292,7 @@ STAGE PLANS:
                           function name: explode
                           Lateral View Join Operator
                             outputColumnNames: _col5, _col6
-                            Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                            Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL
Column stats: COMPLETE
                             Select Operator
                               expressions: _col5 (type: int), _col6 (type: string)
                               outputColumnNames: _col0, _col1
@@ -332,21 +332,21 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5
-                  Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Lateral View Forward
-                    Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
-                      Statistics: Num rows: 1000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                      Statistics: Num rows: 1000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                       Lateral View Join Operator
                         outputColumnNames: _col6
-                        Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                        Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                         Select Operator
                           expressions: _col6 (type: int)
                           outputColumnNames: _col0
-                          Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                          Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                           Limit
                             Number of rows: 3
                             Statistics: Num rows: 3 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
@@ -366,11 +366,11 @@ STAGE PLANS:
                         function name: explode
                         Lateral View Join Operator
                           outputColumnNames: _col6
-                          Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                          Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                           Select Operator
                             expressions: _col6 (type: int)
                             outputColumnNames: _col0
-                            Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                            Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL
Column stats: COMPLETE
                             Limit
                               Number of rows: 3
                               Statistics: Num rows: 3 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
@@ -390,18 +390,18 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col5
-                    Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Lateral View Forward
-                      Statistics: Num rows: 1000 Data size: 158000 Basic stats: COMPLETE
Column stats: COMPLETE
+                      Statistics: Num rows: 1000 Data size: 24000 Basic stats: COMPLETE Column
stats: COMPLETE
                       Select Operator
-                        Statistics: Num rows: 1000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                        Statistics: Num rows: 1000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                         Lateral View Join Operator
                           outputColumnNames: _col6
-                          Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                          Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
                           Select Operator
                             expressions: _col6 (type: int)
                             outputColumnNames: _col0
-                            Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                            Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL
Column stats: COMPLETE
                             Limit
                               Number of rows: 3
                               Statistics: Num rows: 3 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
@@ -421,11 +421,11 @@ STAGE PLANS:
                           function name: explode
                           Lateral View Join Operator
                             outputColumnNames: _col6
-                            Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                            Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL
Column stats: COMPLETE
                             Select Operator
                               expressions: _col6 (type: int)
                               outputColumnNames: _col0
-                              Statistics: Num rows: 2000 Data size: 268000 Basic stats: COMPLETE
Column stats: COMPLETE
+                              Statistics: Num rows: 2000 Data size: 0 Basic stats: PARTIAL
Column stats: COMPLETE
                               Limit
                                 Number of rows: 3
                                 Statistics: Num rows: 3 Data size: 0 Basic stats: PARTIAL
Column stats: COMPLETE
@@ -519,10 +519,10 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 1406 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col4
-                  Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: _col4 (type: int)
                     outputColumnNames: _col0
@@ -546,7 +546,7 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col4
-                    Statistics: Num rows: 1000 Data size: 162000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 28000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: _col4 (type: int)
                       outputColumnNames: _col0

http://git-wip-us.apache.org/repos/asf/hive/blob/d3919332/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/lateral_view_noalias.q.out b/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
index 51a29d0..e1445bf 100644
--- a/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
+++ b/ql/src/test/results/clientpositive/lateral_view_noalias.q.out
@@ -18,14 +18,14 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5, _col6
-                  Statistics: Num rows: 1000 Data size: 326000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 192000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: _col5 (type: string), _col6 (type: int)
                     outputColumnNames: _col0, _col1
-                    Statistics: Num rows: 1000 Data size: 326000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 192000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Limit
                       Number of rows: 2
                       Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
@@ -45,11 +45,11 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col5, _col6
-                    Statistics: Num rows: 1000 Data size: 326000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 192000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: _col5 (type: string), _col6 (type: int)
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 1000 Data size: 326000 Basic stats: COMPLETE
Column stats: COMPLETE
+                      Statistics: Num rows: 1000 Data size: 192000 Basic stats: COMPLETE
Column stats: COMPLETE
                       Limit
                         Number of rows: 2
                         Statistics: Num rows: 2 Data size: 0 Basic stats: PARTIAL Column
stats: COMPLETE
@@ -158,10 +158,10 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5, _col6
-                  Statistics: Num rows: 1000 Data size: 326000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 192000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: _col5 (type: string), _col6 (type: int)
                     outputColumnNames: _col0, _col1
@@ -182,7 +182,7 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col5, _col6
-                    Statistics: Num rows: 1000 Data size: 326000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 192000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: _col5 (type: string), _col6 (type: int)
                       outputColumnNames: _col0, _col1
@@ -259,10 +259,10 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5, _col6
-                  Statistics: Num rows: 1000 Data size: 326000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 192000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: _col5 (type: string), _col6 (type: int)
                     outputColumnNames: _col0, _col1
@@ -283,7 +283,7 @@ STAGE PLANS:
                   function name: explode
                   Lateral View Join Operator
                     outputColumnNames: _col5, _col6
-                    Statistics: Num rows: 1000 Data size: 326000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 192000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: _col5 (type: string), _col6 (type: int)
                       outputColumnNames: _col0, _col1

http://git-wip-us.apache.org/repos/asf/hive/blob/d3919332/ql/src/test/results/clientpositive/udtf_stack.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/udtf_stack.q.out b/ql/src/test/results/clientpositive/udtf_stack.q.out
index 80edb65..43f0a76 100644
--- a/ql/src/test/results/clientpositive/udtf_stack.q.out
+++ b/ql/src/test/results/clientpositive/udtf_stack.q.out
@@ -21,10 +21,10 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5, _col6
-                  Statistics: Num rows: 1000 Data size: 245000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 111000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: _col5 (type: string), _col6 (type: array<int>)
                     outputColumnNames: _col0, _col1
@@ -48,7 +48,7 @@ STAGE PLANS:
                   function name: stack
                   Lateral View Join Operator
                     outputColumnNames: _col5, _col6
-                    Statistics: Num rows: 1000 Data size: 245000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 111000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: _col5 (type: string), _col6 (type: array<int>)
                       outputColumnNames: _col0, _col1
@@ -88,10 +88,10 @@ STAGE PLANS:
             Lateral View Forward
               Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats:
COMPLETE
               Select Operator
-                Statistics: Num rows: 500 Data size: 134000 Basic stats: COMPLETE Column
stats: COMPLETE
+                Statistics: Num rows: 500 Data size: 0 Basic stats: PARTIAL Column stats:
COMPLETE
                 Lateral View Join Operator
                   outputColumnNames: _col5, _col6
-                  Statistics: Num rows: 1000 Data size: 269000 Basic stats: COMPLETE Column
stats: COMPLETE
+                  Statistics: Num rows: 1000 Data size: 135000 Basic stats: COMPLETE Column
stats: COMPLETE
                   Select Operator
                     expressions: _col5 (type: string), _col6 (type: array<int>)
                     outputColumnNames: _col0, _col1
@@ -115,7 +115,7 @@ STAGE PLANS:
                   function name: stack
                   Lateral View Join Operator
                     outputColumnNames: _col5, _col6
-                    Statistics: Num rows: 1000 Data size: 269000 Basic stats: COMPLETE Column
stats: COMPLETE
+                    Statistics: Num rows: 1000 Data size: 135000 Basic stats: COMPLETE Column
stats: COMPLETE
                     Select Operator
                       expressions: _col5 (type: string), _col6 (type: array<int>)
                       outputColumnNames: _col0, _col1


Mime
View raw message