hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1629562 [12/38] - in /hive/branches/spark: ./ accumulo-handler/ beeline/ beeline/src/java/org/apache/hive/beeline/ bin/ext/ common/ common/src/java/org/apache/hadoop/hive/conf/ common/src/test/org/apache/hadoop/hive/common/type/ contrib/sr...
Date Mon, 06 Oct 2014 03:44:26 GMT
Modified: hive/branches/spark/ql/src/test/queries/clientpositive/vectorization_0.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/vectorization_0.q?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/vectorization_0.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/vectorization_0.q Mon Oct  6 03:44:13 2014
@@ -1,180 +1,4 @@
 SET hive.vectorized.execution.enabled=true;
-
--- Use ORDER BY clauses to generate 2 stages.
-EXPLAIN
-SELECT MIN(ctinyint) as c1,
-       MAX(ctinyint),
-       COUNT(ctinyint),
-       COUNT(*)
-FROM   alltypesorc
-ORDER BY c1;
-
-SELECT MIN(ctinyint) as c1,
-       MAX(ctinyint),
-       COUNT(ctinyint),
-       COUNT(*)
-FROM   alltypesorc
-ORDER BY c1;
-
-EXPLAIN
-SELECT SUM(ctinyint) as c1
-FROM   alltypesorc
-ORDER BY c1;
-
-SELECT SUM(ctinyint) as c1
-FROM   alltypesorc
-ORDER BY c1;
-
-EXPLAIN 
-SELECT
-  avg(ctinyint) as c1,
-  variance(ctinyint),
-  var_pop(ctinyint),
-  var_samp(ctinyint),
-  std(ctinyint),
-  stddev(ctinyint),
-  stddev_pop(ctinyint),
-  stddev_samp(ctinyint)
-FROM alltypesorc
-ORDER BY c1;
-
-SELECT
-  avg(ctinyint) as c1,
-  variance(ctinyint),
-  var_pop(ctinyint),
-  var_samp(ctinyint),
-  std(ctinyint),
-  stddev(ctinyint),
-  stddev_pop(ctinyint),
-  stddev_samp(ctinyint)
-FROM alltypesorc
-ORDER BY c1;
-
-EXPLAIN
-SELECT MIN(cbigint) as c1,
-       MAX(cbigint),
-       COUNT(cbigint),
-       COUNT(*)
-FROM   alltypesorc
-ORDER BY c1;
-
-SELECT MIN(cbigint) as c1,
-       MAX(cbigint),
-       COUNT(cbigint),
-       COUNT(*)
-FROM   alltypesorc
-ORDER BY c1;
-
-EXPLAIN
-SELECT SUM(cbigint) as c1
-FROM   alltypesorc
-ORDER BY c1;
-
-SELECT SUM(cbigint) as c1
-FROM   alltypesorc
-ORDER BY c1;
-
-EXPLAIN 
-SELECT
-  avg(cbigint) as c1,
-  variance(cbigint),
-  var_pop(cbigint),
-  var_samp(cbigint),
-  std(cbigint),
-  stddev(cbigint),
-  stddev_pop(cbigint),
-  stddev_samp(cbigint)
-FROM alltypesorc
-ORDER BY c1;
-
-SELECT
-  avg(cbigint) as c1,
-  variance(cbigint),
-  var_pop(cbigint),
-  var_samp(cbigint),
-  std(cbigint),
-  stddev(cbigint),
-  stddev_pop(cbigint),
-  stddev_samp(cbigint)
-FROM alltypesorc
-ORDER BY c1;
-
-EXPLAIN
-SELECT MIN(cfloat) as c1,
-       MAX(cfloat),
-       COUNT(cfloat),
-       COUNT(*)
-FROM   alltypesorc
-ORDER BY c1;
-
-SELECT MIN(cfloat) as c1,
-       MAX(cfloat),
-       COUNT(cfloat),
-       COUNT(*)
-FROM   alltypesorc
-ORDER BY c1;
-
-EXPLAIN
-SELECT SUM(cfloat) as c1
-FROM   alltypesorc
-ORDER BY c1;
-
-SELECT SUM(cfloat) as c1
-FROM   alltypesorc
-ORDER BY c1;
-
-EXPLAIN 
-SELECT
-  avg(cfloat) as c1,
-  variance(cfloat),
-  var_pop(cfloat),
-  var_samp(cfloat),
-  std(cfloat),
-  stddev(cfloat),
-  stddev_pop(cfloat),
-  stddev_samp(cfloat)
-FROM alltypesorc
-ORDER BY c1;
-
-SELECT
-  avg(cfloat) as c1,
-  variance(cfloat),
-  var_pop(cfloat),
-  var_samp(cfloat),
-  std(cfloat),
-  stddev(cfloat),
-  stddev_pop(cfloat),
-  stddev_samp(cfloat)
-FROM alltypesorc
-ORDER BY c1;
-
-EXPLAIN
-SELECT AVG(cbigint),
-       (-(AVG(cbigint))),
-       (-6432 + AVG(cbigint)),
-       STDDEV_POP(cbigint),
-       (-((-6432 + AVG(cbigint)))),
-       ((-((-6432 + AVG(cbigint)))) + (-6432 + AVG(cbigint))),
-       VAR_SAMP(cbigint),
-       (-((-6432 + AVG(cbigint)))),
-       (-6432 + (-((-6432 + AVG(cbigint))))),
-       (-((-6432 + AVG(cbigint)))),
-       ((-((-6432 + AVG(cbigint)))) / (-((-6432 + AVG(cbigint))))),
-       COUNT(*),
-       SUM(cfloat),
-       (VAR_SAMP(cbigint) % STDDEV_POP(cbigint)),
-       (-(VAR_SAMP(cbigint))),
-       ((-((-6432 + AVG(cbigint)))) * (-(AVG(cbigint)))),
-       MIN(ctinyint),
-       (-(MIN(ctinyint)))
-FROM   alltypesorc
-WHERE  (((cstring2 LIKE '%b%')
-         OR ((79.553 != cint)
-             OR (cbigint < cdouble)))
-        OR ((ctinyint >= csmallint)
-            AND ((cboolean2 = 1)
-                 AND (3569 = ctinyint))));
-
 SELECT AVG(cbigint),
        (-(AVG(cbigint))),
        (-6432 + AVG(cbigint)),

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/vectorized_date_funcs.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/vectorized_date_funcs.q?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/vectorized_date_funcs.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/vectorized_date_funcs.q Mon Oct  6 03:44:13 2014
@@ -122,20 +122,4 @@ SELECT 
 FROM date_udf_flight_orc LIMIT 10;
 
 -- Test extracting the date part of expression that includes time
-SELECT to_date('2009-07-30 04:17:52') FROM date_udf_flight_orc LIMIT 1;
-
-EXPLAIN SELECT
-  min(fl_date) AS c1,
-  max(fl_date),
-  count(fl_date),
-  count(*)
-FROM date_udf_flight_orc
-ORDER BY c1;
-
-SELECT
-  min(fl_date) AS c1,
-  max(fl_date),
-  count(fl_date),
-  count(*)
-FROM date_udf_flight_orc
-ORDER BY c1;
\ No newline at end of file
+SELECT to_date('2009-07-30 04:17:52') FROM date_udf_flight_orc LIMIT 1;
\ No newline at end of file

Modified: hive/branches/spark/ql/src/test/queries/clientpositive/vectorized_timestamp_funcs.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/clientpositive/vectorized_timestamp_funcs.q?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/clientpositive/vectorized_timestamp_funcs.q (original)
+++ hive/branches/spark/ql/src/test/queries/clientpositive/vectorized_timestamp_funcs.q Mon Oct  6 03:44:13 2014
@@ -1,7 +1,6 @@
--- Test timestamp functions in vectorized mode to verify they run correctly end-to-end.
--- Turning on vectorization has been temporarily moved after filling the test table
--- due to bug HIVE-8197.
+SET hive.vectorized.execution.enabled = true;
 
+-- Test timestamp functions in vectorized mode to verify they run correctly end-to-end.
 
 CREATE TABLE alltypesorc_string(ctimestamp1 timestamp, stimestamp1 string) STORED AS ORC;
 
@@ -12,8 +11,6 @@ SELECT
 FROM alltypesorc
 LIMIT 40;
 
-SET hive.vectorized.execution.enabled = true;
-
 CREATE TABLE alltypesorc_wrong(stimestamp1 string) STORED AS ORC;
 
 INSERT INTO TABLE alltypesorc_wrong SELECT 'abcd' FROM alltypesorc LIMIT 1;
@@ -125,48 +122,3 @@ SELECT
   second(stimestamp1)
 FROM alltypesorc_wrong
 ORDER BY c1;
-
-EXPLAIN SELECT
-  min(ctimestamp1),
-  max(ctimestamp1),
-  count(ctimestamp1),
-  count(*)
-FROM alltypesorc_string;
-
-SELECT
-  min(ctimestamp1),
-  max(ctimestamp1),
-  count(ctimestamp1),
-  count(*)
-FROM alltypesorc_string;
-
--- SUM of timestamps are not vectorized reduce-side because they produce a double instead of a long (HIVE-8211)...
-EXPLAIN SELECT
-  sum(ctimestamp1)
-FROM alltypesorc_string;
-
-SELECT
- sum(ctimestamp1)
-FROM alltypesorc_string;
-
-EXPLAIN SELECT
-  avg(ctimestamp1),
-  variance(ctimestamp1),
-  var_pop(ctimestamp1),
-  var_samp(ctimestamp1),
-  std(ctimestamp1),
-  stddev(ctimestamp1),
-  stddev_pop(ctimestamp1),
-  stddev_samp(ctimestamp1)
-FROM alltypesorc_string;
-
-SELECT
-  avg(ctimestamp1),
-  variance(ctimestamp1),
-  var_pop(ctimestamp1),
-  var_samp(ctimestamp1),
-  std(ctimestamp1),
-  stddev(ctimestamp1),
-  stddev_pop(ctimestamp1),
-  stddev_samp(ctimestamp1)
-FROM alltypesorc_string;
\ No newline at end of file

Modified: hive/branches/spark/ql/src/test/queries/positive/udf6.q
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/queries/positive/udf6.q?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/queries/positive/udf6.q (original)
+++ hive/branches/spark/ql/src/test/queries/positive/udf6.q Mon Oct  6 03:44:13 2014
@@ -1 +1 @@
-FROM src SELECT CONCAT('a', 'b'), IF(TRUE, 1 ,2) + key
+FROM src SELECT CONCAT('a', 'b'), IF(TRUE, 1 ,2)

Modified: hive/branches/spark/ql/src/test/resources/orc-file-dump-dictionary-threshold.out
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/resources/orc-file-dump-dictionary-threshold.out?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/resources/orc-file-dump-dictionary-threshold.out (original)
+++ hive/branches/spark/ql/src/test/resources/orc-file-dump-dictionary-threshold.out Mon Oct  6 03:44:13 2014
@@ -38,7 +38,7 @@ File Statistics:
   Column 3: count: 21000 min: Darkness,-230 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988-8232-8256-8390-8416-8478-8620-8840-8984-9038-9128-9236-9248-9344-9594-9650-9714-9928-9938-10178-10368-10414-10502-10732-10876-11008-11158-11410-11722-11836-11964-12054-12096-12126-12136-12202-12246-12298-12616-12774-12782-12790-12802-12976-13216-13246-13502-13766-14454-14974-15004-15124-15252-15294-15356-15530-15610-16316-16936-17024-17122-17214-17310-17528-17682-17742-17870-17878-18010-18410-18524-18788-19204-19254-19518-19596-19786-19874-19904-20390-20752-20936 sum: 6910238
 
 Stripes:
-  Stripe: offset: 3 data: 151108 rows: 5000 tail: 68 index: 704
+  Stripe: offset: 3 data: 151109 rows: 5000 tail: 68 index: 704
     Stream: column 0 section ROW_INDEX start: 3 length 15
     Stream: column 1 section ROW_INDEX start: 18 length 156
     Stream: column 2 section ROW_INDEX start: 174 length 172
@@ -46,7 +46,7 @@ Stripes:
     Stream: column 1 section DATA start: 707 length 20029
     Stream: column 2 section DATA start: 20736 length 40035
     Stream: column 3 section DATA start: 60771 length 86757
-    Stream: column 3 section LENGTH start: 147528 length 4287
+    Stream: column 3 section LENGTH start: 147528 length 4288
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -65,19 +65,19 @@ Stripes:
       Entry 4: count: 1000 min: -9216505819108477308 max: 9196474183833079923 positions: 20006,8686,416
     Row group index column 3:
       Entry 0: count: 1000 min: Darkness,-230 max: worst-54-290-346-648-908-996 positions: 0,0,0,0,0
-      Entry 1: count: 1000 min: Darkness,-230-368-488-586-862-930-1686 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966 positions: 2777,8442,0,695,18
-      Entry 2: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660 positions: 13595,4780,0,1554,14
-      Entry 3: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788 positions: 31432,228,0,2372,90
-      Entry 4: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744 positions: 54111,5096,0,3354,108
-  Stripe: offset: 151883 data: 336358 rows: 5000 tail: 69 index: 941
-    Stream: column 0 section ROW_INDEX start: 151883 length 15
-    Stream: column 1 section ROW_INDEX start: 151898 length 150
-    Stream: column 2 section ROW_INDEX start: 152048 length 167
-    Stream: column 3 section ROW_INDEX start: 152215 length 609
-    Stream: column 1 section DATA start: 152824 length 20029
-    Stream: column 2 section DATA start: 172853 length 40035
-    Stream: column 3 section DATA start: 212888 length 270789
-    Stream: column 3 section LENGTH start: 483677 length 5505
+      Entry 1: count: 1000 min: Darkness,-230-368-488-586-862-930-1686 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966 positions: 2777,8442,0,696,18
+      Entry 2: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660 positions: 13595,4780,0,1555,14
+      Entry 3: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788 positions: 31432,228,0,2373,90
+      Entry 4: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744 positions: 54111,5096,0,3355,108
+  Stripe: offset: 151884 data: 336358 rows: 5000 tail: 69 index: 941
+    Stream: column 0 section ROW_INDEX start: 151884 length 15
+    Stream: column 1 section ROW_INDEX start: 151899 length 150
+    Stream: column 2 section ROW_INDEX start: 152049 length 167
+    Stream: column 3 section ROW_INDEX start: 152216 length 609
+    Stream: column 1 section DATA start: 152825 length 20029
+    Stream: column 2 section DATA start: 172854 length 40035
+    Stream: column 3 section DATA start: 212889 length 270789
+    Stream: column 3 section LENGTH start: 483678 length 5505
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -100,15 +100,15 @@ Stripes:
       Entry 2: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988 positions: 80822,9756,0,1945,222
       Entry 3: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100-7194-7802-8030 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988-8232-8256-8390-8416-8478-8620-8840-8984 positions: 137149,4496,0,3268,48
       Entry 4: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100-7194-7802-8030-8452-8608-8640-8862-8868-9134 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988-8232-8256-8390-8416-8478-8620-8840-8984-9038-9128-9236-9248-9344-9594-9650-9714-9928-9938 positions: 197972,6590,0,4064,342
-  Stripe: offset: 489251 data: 558031 rows: 5000 tail: 69 index: 1169
-    Stream: column 0 section ROW_INDEX start: 489251 length 15
-    Stream: column 1 section ROW_INDEX start: 489266 length 159
-    Stream: column 2 section ROW_INDEX start: 489425 length 169
-    Stream: column 3 section ROW_INDEX start: 489594 length 826
-    Stream: column 1 section DATA start: 490420 length 20029
-    Stream: column 2 section DATA start: 510449 length 40035
-    Stream: column 3 section DATA start: 550484 length 492258
-    Stream: column 3 section LENGTH start: 1042742 length 5709
+  Stripe: offset: 489252 data: 558031 rows: 5000 tail: 69 index: 1169
+    Stream: column 0 section ROW_INDEX start: 489252 length 15
+    Stream: column 1 section ROW_INDEX start: 489267 length 159
+    Stream: column 2 section ROW_INDEX start: 489426 length 169
+    Stream: column 3 section ROW_INDEX start: 489595 length 826
+    Stream: column 1 section DATA start: 490421 length 20029
+    Stream: column 2 section DATA start: 510450 length 40035
+    Stream: column 3 section DATA start: 550485 length 492258
+    Stream: column 3 section LENGTH start: 1042743 length 5709
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -131,15 +131,15 @@ Stripes:
       Entry 2: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100-7194-7802-8030-8452-8608-8640-8862-8868-9134-9234-9412-9602-9608-9642-9678-9740-9780-10426-10510-10514-10706-10814-10870-10942-11028-11244-11326-11462-11496-11656-11830-12022 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988-8232-8256-8390-8416-8478-8620-8840-8984-9038-9128-9236-9248-9344-9594-9650-9714-9928-9938-10178-10368-10414-10502-10732-10876-11008-11158-11410-11722-11836-11964-12054-12096-12126-12136-12202-12246-12298-12616-12774-12782-12790-12802-12976 positions: 170641,3422,0,2077,16
 2
       Entry 3: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100-7194-7802-8030-8452-8608-8640-8862-8868-9134-9234-9412-9602-9608-9642-9678-9740-9780-10426-10510-10514-10706-10814-10870-10942-11028-11244-11326-11462-11496-11656-11830-12022-12178-12418-12832-13304 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988-8232-8256-8390-8416-8478-8620-8840-8984-9038-9128-9236-9248-9344-9594-9650-9714-9928-9938-10178-10368-10414-10502-10732-10876-11008-11158-11410-11722-11836-11964-12054-12096-12126-12136-12202-12246-12298-12616-12774-12782-12790-12802-12976-13216-13
 246-13502-13766 positions: 268420,9960,0,3369,16
       Entry 4: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100-7194-7802-8030-8452-8608-8640-8862-8868-9134-9234-9412-9602-9608-9642-9678-9740-9780-10426-10510-10514-10706-10814-10870-10942-11028-11244-11326-11462-11496-11656-11830-12022-12178-12418-12832-13304-13448-13590-13618-13908-14188 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988-8232-8256-8390-8416-8478-8620-8840-8984-9038-9128-9236-9248-9344-9594-9650-9714-9928-9938-10178-10368-10414-10502-10732-10876-11008-11158-11410-11722-11836-11964-12054-12096-12126-12136-12202-12246-12298-12616-12774-12
 782-12790-12802-12976-13216-13246-13502-13766-14454-14974 positions: 377916,1620,0,4041,470
-  Stripe: offset: 1048520 data: 792850 rows: 5000 tail: 69 index: 1351
-    Stream: column 0 section ROW_INDEX start: 1048520 length 15
-    Stream: column 1 section ROW_INDEX start: 1048535 length 149
-    Stream: column 2 section ROW_INDEX start: 1048684 length 170
-    Stream: column 3 section ROW_INDEX start: 1048854 length 1017
-    Stream: column 1 section DATA start: 1049871 length 20029
-    Stream: column 2 section DATA start: 1069900 length 40035
-    Stream: column 3 section DATA start: 1109935 length 727038
-    Stream: column 3 section LENGTH start: 1836973 length 5748
+  Stripe: offset: 1048521 data: 792850 rows: 5000 tail: 69 index: 1351
+    Stream: column 0 section ROW_INDEX start: 1048521 length 15
+    Stream: column 1 section ROW_INDEX start: 1048536 length 149
+    Stream: column 2 section ROW_INDEX start: 1048685 length 170
+    Stream: column 3 section ROW_INDEX start: 1048855 length 1017
+    Stream: column 1 section DATA start: 1049872 length 20029
+    Stream: column 2 section DATA start: 1069901 length 40035
+    Stream: column 3 section DATA start: 1109936 length 727038
+    Stream: column 3 section LENGTH start: 1836974 length 5748
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -162,15 +162,15 @@ Stripes:
       Entry 2: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100-7194-7802-8030-8452-8608-8640-8862-8868-9134-9234-9412-9602-9608-9642-9678-9740-9780-10426-10510-10514-10706-10814-10870-10942-11028-11244-11326-11462-11496-11656-11830-12022-12178-12418-12832-13304-13448-13590-13618-13908-14188-14246-14340-14364-14394-14762-14850-14964-15048-15494-15674-15726-16006-16056-16180-16304-16332-16452-16598-16730-16810-16994-17210 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988-8232-8256-8390-8416-8478-8620-8840-8984-9038-9128-9236-9248-9344-9594-9650-9714-9928-9
 938-10178-10368-10414-10502-10732-10876-11008-11158-11410-11722-11836-11964-12054-12096-12126-12136-12202-12246-12298-12616-12774-12782-12790-12802-12976-13216-13246-13502-13766-14454-14974-15004-15124-15252-15294-15356-15530-15610-16316-16936-17024-17122-17214-17310-17528-17682-17742-17870-17878 positions: 263111,206,0,1926,462
       Entry 3: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100-7194-7802-8030-8452-8608-8640-8862-8868-9134-9234-9412-9602-9608-9642-9678-9740-9780-10426-10510-10514-10706-10814-10870-10942-11028-11244-11326-11462-11496-11656-11830-12022-12178-12418-12832-13304-13448-13590-13618-13908-14188-14246-14340-14364-14394-14762-14850-14964-15048-15494-15674-15726-16006-16056-16180-16304-16332-16452-16598-16730-16810-16994-17210-17268-17786-17962-18214 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988-8232-8256-8390-8416-8478-8620-8840-8984-9038-9128-9236-9248-93
 44-9594-9650-9714-9928-9938-10178-10368-10414-10502-10732-10876-11008-11158-11410-11722-11836-11964-12054-12096-12126-12136-12202-12246-12298-12616-12774-12782-12790-12802-12976-13216-13246-13502-13766-14454-14974-15004-15124-15252-15294-15356-15530-15610-16316-16936-17024-17122-17214-17310-17528-17682-17742-17870-17878-18010-18410-18524-18788 positions: 407371,8480,0,3444,250
       Entry 4: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100-7194-7802-8030-8452-8608-8640-8862-8868-9134-9234-9412-9602-9608-9642-9678-9740-9780-10426-10510-10514-10706-10814-10870-10942-11028-11244-11326-11462-11496-11656-11830-12022-12178-12418-12832-13304-13448-13590-13618-13908-14188-14246-14340-14364-14394-14762-14850-14964-15048-15494-15674-15726-16006-16056-16180-16304-16332-16452-16598-16730-16810-16994-17210-17268-17786-17962-18214-18444-18446-18724-18912-18952-19164 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-7960-7988-8232-8256-8390-8416-8478-8
 620-8840-8984-9038-9128-9236-9248-9344-9594-9650-9714-9928-9938-10178-10368-10414-10502-10732-10876-11008-11158-11410-11722-11836-11964-12054-12096-12126-12136-12202-12246-12298-12616-12774-12782-12790-12802-12976-13216-13246-13502-13766-14454-14974-15004-15124-15252-15294-15356-15530-15610-16316-16936-17024-17122-17214-17310-17528-17682-17742-17870-17878-18010-18410-18524-18788-19204-19254-19518-19596-19786-19874-19904 positions: 562094,3058,0,4643,292
-  Stripe: offset: 1842790 data: 188033 rows: 1000 tail: 67 index: 832
-    Stream: column 0 section ROW_INDEX start: 1842790 length 10
-    Stream: column 1 section ROW_INDEX start: 1842800 length 36
-    Stream: column 2 section ROW_INDEX start: 1842836 length 39
-    Stream: column 3 section ROW_INDEX start: 1842875 length 747
-    Stream: column 1 section DATA start: 1843622 length 4007
-    Stream: column 2 section DATA start: 1847629 length 8007
-    Stream: column 3 section DATA start: 1855636 length 174759
-    Stream: column 3 section LENGTH start: 2030395 length 1260
+  Stripe: offset: 1842791 data: 188033 rows: 1000 tail: 67 index: 832
+    Stream: column 0 section ROW_INDEX start: 1842791 length 10
+    Stream: column 1 section ROW_INDEX start: 1842801 length 36
+    Stream: column 2 section ROW_INDEX start: 1842837 length 39
+    Stream: column 3 section ROW_INDEX start: 1842876 length 747
+    Stream: column 1 section DATA start: 1843623 length 4007
+    Stream: column 2 section DATA start: 1847630 length 8007
+    Stream: column 3 section DATA start: 1855637 length 174759
+    Stream: column 3 section LENGTH start: 2030396 length 1260
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -182,6 +182,6 @@ Stripes:
     Row group index column 3:
       Entry 0: count: 1000 min: Darkness,-230-368-488-586-862-930-1686-2044-2636-2652-2872-3108-3162-3192-3404-3442-3508-3542-3550-3712-3980-4146-4204-4336-4390-4418-4424-4490-4512-4650-4768-4924-4950-5210-5524-5630-5678-5710-5758-5952-6238-6252-6300-6366-6668-6712-6926-6942-7100-7194-7802-8030-8452-8608-8640-8862-8868-9134-9234-9412-9602-9608-9642-9678-9740-9780-10426-10510-10514-10706-10814-10870-10942-11028-11244-11326-11462-11496-11656-11830-12022-12178-12418-12832-13304-13448-13590-13618-13908-14188-14246-14340-14364-14394-14762-14850-14964-15048-15494-15674-15726-16006-16056-16180-16304-16332-16452-16598-16730-16810-16994-17210-17268-17786-17962-18214-18444-18446-18724-18912-18952-19164-19348-19400-19546-19776-19896-20084 max: worst-54-290-346-648-908-996-1038-1080-1560-1584-1620-1744-1770-1798-1852-1966-2162-2244-2286-2296-2534-2660-3114-3676-3788-4068-4150-4706-4744-5350-5420-5582-5696-5726-6006-6020-6024-6098-6184-6568-6636-6802-6994-7004-7318-7498-7758-7780-7798-7920-7952-
 7960-7988-8232-8256-8390-8416-8478-8620-8840-8984-9038-9128-9236-9248-9344-9594-9650-9714-9928-9938-10178-10368-10414-10502-10732-10876-11008-11158-11410-11722-11836-11964-12054-12096-12126-12136-12202-12246-12298-12616-12774-12782-12790-12802-12976-13216-13246-13502-13766-14454-14974-15004-15124-15252-15294-15356-15530-15610-16316-16936-17024-17122-17214-17310-17528-17682-17742-17870-17878-18010-18410-18524-18788-19204-19254-19518-19596-19786-19874-19904-20390-20752-20936 positions: 0,0,0,0,0
 
-File length: 2033557 bytes
+File length: 2033559 bytes
 Padding length: 0 bytes
 Padding ratio: 0%

Modified: hive/branches/spark/ql/src/test/resources/orc-file-dump.out
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/resources/orc-file-dump.out?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/resources/orc-file-dump.out (original)
+++ hive/branches/spark/ql/src/test/resources/orc-file-dump.out Mon Oct  6 03:44:13 2014
@@ -38,16 +38,16 @@ File Statistics:
   Column 3: count: 21000 min: Darkness, max: worst sum: 81761
 
 Stripes:
-  Stripe: offset: 3 data: 63765 rows: 5000 tail: 79 index: 428
+  Stripe: offset: 3 data: 63766 rows: 5000 tail: 79 index: 428
     Stream: column 0 section ROW_INDEX start: 3 length 15
     Stream: column 1 section ROW_INDEX start: 18 length 158
     Stream: column 2 section ROW_INDEX start: 176 length 171
     Stream: column 3 section ROW_INDEX start: 347 length 84
     Stream: column 1 section DATA start: 431 length 20029
     Stream: column 2 section DATA start: 20460 length 40035
-    Stream: column 3 section DATA start: 60495 length 3543
-    Stream: column 3 section LENGTH start: 64038 length 25
-    Stream: column 3 section DICTIONARY_DATA start: 64063 length 133
+    Stream: column 3 section DATA start: 60495 length 3544
+    Stream: column 3 section LENGTH start: 64039 length 25
+    Stream: column 3 section DICTIONARY_DATA start: 64064 length 133
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -68,18 +68,18 @@ Stripes:
       Entry 0: count: 1000 min: Darkness, max: worst positions: 0,0,0
       Entry 1: count: 1000 min: Darkness, max: worst positions: 0,659,149
       Entry 2: count: 1000 min: Darkness, max: worst positions: 0,1531,3
-      Entry 3: count: 1000 min: Darkness, max: worst positions: 0,2281,32
-      Entry 4: count: 1000 min: Darkness, max: worst positions: 0,3033,45
-  Stripe: offset: 64275 data: 63754 rows: 5000 tail: 79 index: 421
-    Stream: column 0 section ROW_INDEX start: 64275 length 15
-    Stream: column 1 section ROW_INDEX start: 64290 length 157
-    Stream: column 2 section ROW_INDEX start: 64447 length 169
-    Stream: column 3 section ROW_INDEX start: 64616 length 80
-    Stream: column 1 section DATA start: 64696 length 20029
-    Stream: column 2 section DATA start: 84725 length 40035
-    Stream: column 3 section DATA start: 124760 length 3532
-    Stream: column 3 section LENGTH start: 128292 length 25
-    Stream: column 3 section DICTIONARY_DATA start: 128317 length 133
+      Entry 3: count: 1000 min: Darkness, max: worst positions: 0,2282,32
+      Entry 4: count: 1000 min: Darkness, max: worst positions: 0,3034,45
+  Stripe: offset: 64276 data: 63755 rows: 5000 tail: 79 index: 421
+    Stream: column 0 section ROW_INDEX start: 64276 length 15
+    Stream: column 1 section ROW_INDEX start: 64291 length 157
+    Stream: column 2 section ROW_INDEX start: 64448 length 169
+    Stream: column 3 section ROW_INDEX start: 64617 length 80
+    Stream: column 1 section DATA start: 64697 length 20029
+    Stream: column 2 section DATA start: 84726 length 40035
+    Stream: column 3 section DATA start: 124761 length 3533
+    Stream: column 3 section LENGTH start: 128294 length 25
+    Stream: column 3 section DICTIONARY_DATA start: 128319 length 133
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -101,17 +101,17 @@ Stripes:
       Entry 1: count: 1000 min: Darkness, max: worst positions: 0,761,12
       Entry 2: count: 1000 min: Darkness, max: worst positions: 0,1472,70
       Entry 3: count: 1000 min: Darkness, max: worst positions: 0,2250,43
-      Entry 4: count: 1000 min: Darkness, max: worst positions: 0,2978,88
-  Stripe: offset: 128529 data: 63766 rows: 5000 tail: 79 index: 422
-    Stream: column 0 section ROW_INDEX start: 128529 length 15
-    Stream: column 1 section ROW_INDEX start: 128544 length 153
-    Stream: column 2 section ROW_INDEX start: 128697 length 169
-    Stream: column 3 section ROW_INDEX start: 128866 length 85
-    Stream: column 1 section DATA start: 128951 length 20029
-    Stream: column 2 section DATA start: 148980 length 40035
-    Stream: column 3 section DATA start: 189015 length 3544
-    Stream: column 3 section LENGTH start: 192559 length 25
-    Stream: column 3 section DICTIONARY_DATA start: 192584 length 133
+      Entry 4: count: 1000 min: Darkness, max: worst positions: 0,2979,88
+  Stripe: offset: 128531 data: 63766 rows: 5000 tail: 79 index: 422
+    Stream: column 0 section ROW_INDEX start: 128531 length 15
+    Stream: column 1 section ROW_INDEX start: 128546 length 153
+    Stream: column 2 section ROW_INDEX start: 128699 length 169
+    Stream: column 3 section ROW_INDEX start: 128868 length 85
+    Stream: column 1 section DATA start: 128953 length 20029
+    Stream: column 2 section DATA start: 148982 length 40035
+    Stream: column 3 section DATA start: 189017 length 3544
+    Stream: column 3 section LENGTH start: 192561 length 25
+    Stream: column 3 section DICTIONARY_DATA start: 192586 length 133
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -134,16 +134,16 @@ Stripes:
       Entry 2: count: 1000 min: Darkness, max: worst positions: 0,1469,69
       Entry 3: count: 1000 min: Darkness, max: worst positions: 0,2133,194
       Entry 4: count: 1000 min: Darkness, max: worst positions: 0,3005,43
-  Stripe: offset: 192796 data: 63796 rows: 5000 tail: 79 index: 425
-    Stream: column 0 section ROW_INDEX start: 192796 length 15
-    Stream: column 1 section ROW_INDEX start: 192811 length 156
-    Stream: column 2 section ROW_INDEX start: 192967 length 168
-    Stream: column 3 section ROW_INDEX start: 193135 length 86
-    Stream: column 1 section DATA start: 193221 length 20029
-    Stream: column 2 section DATA start: 213250 length 40035
-    Stream: column 3 section DATA start: 253285 length 3574
-    Stream: column 3 section LENGTH start: 256859 length 25
-    Stream: column 3 section DICTIONARY_DATA start: 256884 length 133
+  Stripe: offset: 192798 data: 63796 rows: 5000 tail: 79 index: 425
+    Stream: column 0 section ROW_INDEX start: 192798 length 15
+    Stream: column 1 section ROW_INDEX start: 192813 length 156
+    Stream: column 2 section ROW_INDEX start: 192969 length 168
+    Stream: column 3 section ROW_INDEX start: 193137 length 86
+    Stream: column 1 section DATA start: 193223 length 20029
+    Stream: column 2 section DATA start: 213252 length 40035
+    Stream: column 3 section DATA start: 253287 length 3574
+    Stream: column 3 section LENGTH start: 256861 length 25
+    Stream: column 3 section DICTIONARY_DATA start: 256886 length 133
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -166,16 +166,16 @@ Stripes:
       Entry 2: count: 1000 min: Darkness, max: worst positions: 0,1485,52
       Entry 3: count: 1000 min: Darkness, max: worst positions: 0,2196,104
       Entry 4: count: 1000 min: Darkness, max: worst positions: 0,2934,131
-  Stripe: offset: 257096 data: 12940 rows: 1000 tail: 71 index: 123
-    Stream: column 0 section ROW_INDEX start: 257096 length 10
-    Stream: column 1 section ROW_INDEX start: 257106 length 36
-    Stream: column 2 section ROW_INDEX start: 257142 length 39
-    Stream: column 3 section ROW_INDEX start: 257181 length 38
-    Stream: column 1 section DATA start: 257219 length 4007
-    Stream: column 2 section DATA start: 261226 length 8007
-    Stream: column 3 section DATA start: 269233 length 768
-    Stream: column 3 section LENGTH start: 270001 length 25
-    Stream: column 3 section DICTIONARY_DATA start: 270026 length 133
+  Stripe: offset: 257098 data: 12940 rows: 1000 tail: 71 index: 123
+    Stream: column 0 section ROW_INDEX start: 257098 length 10
+    Stream: column 1 section ROW_INDEX start: 257108 length 36
+    Stream: column 2 section ROW_INDEX start: 257144 length 39
+    Stream: column 3 section ROW_INDEX start: 257183 length 38
+    Stream: column 1 section DATA start: 257221 length 4007
+    Stream: column 2 section DATA start: 261228 length 8007
+    Stream: column 3 section DATA start: 269235 length 768
+    Stream: column 3 section LENGTH start: 270003 length 25
+    Stream: column 3 section DICTIONARY_DATA start: 270028 length 133
     Encoding column 0: DIRECT
     Encoding column 1: DIRECT_V2
     Encoding column 2: DIRECT_V2
@@ -187,6 +187,6 @@ Stripes:
     Row group index column 3:
       Entry 0: count: 1000 min: Darkness, max: worst positions: 0,0,0
 
-File length: 270760 bytes
+File length: 270759 bytes
 Padding length: 0 bytes
 Padding ratio: 0%

Modified: hive/branches/spark/ql/src/test/results/clientnegative/limit_partition_stats.q.out
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/results/clientnegative/limit_partition_stats.q.out?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/results/clientnegative/limit_partition_stats.q.out (original)
+++ hive/branches/spark/ql/src/test/results/clientnegative/limit_partition_stats.q.out Mon Oct  6 03:44:13 2014
@@ -43,11 +43,9 @@ STAGE PLANS:
 
 PREHOOK: query: select count(*) from part
 PREHOOK: type: QUERY
-PREHOOK: Input: default@part
 #### A masked pattern was here ####
 POSTHOOK: query: select count(*) from part
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@part
 #### A masked pattern was here ####
 2000
 PREHOOK: query: explain select count(*) from part
@@ -64,31 +62,31 @@ STAGE PLANS:
       Map Operator Tree:
           TableScan
             alias: part
-            Statistics: Num rows: 2000 Data size: 4000 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 2000 Data size: 4000 Basic stats: COMPLETE Column stats: COMPLETE
             Select Operator
-              Statistics: Num rows: 2000 Data size: 4000 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 2000 Data size: 4000 Basic stats: COMPLETE Column stats: COMPLETE
               Group By Operator
                 aggregations: count()
                 mode: hash
                 outputColumnNames: _col0
-                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   sort order: 
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
                   value expressions: _col0 (type: bigint)
       Reduce Operator Tree:
         Group By Operator
           aggregations: count(VALUE._col0)
           mode: mergepartial
           outputColumnNames: _col0
-          Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: bigint)
             outputColumnNames: _col0
-            Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

Modified: hive/branches/spark/ql/src/test/results/clientnegative/udf_local_resource.q.out
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/results/clientnegative/udf_local_resource.q.out?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/results/clientnegative/udf_local_resource.q.out (original)
+++ hive/branches/spark/ql/src/test/results/clientnegative/udf_local_resource.q.out Mon Oct  6 03:44:13 2014
@@ -1,6 +1,5 @@
 PREHOOK: query: create function lookup as 'org.apache.hadoop.hive.ql.udf.UDFFileLookup' using file '../../data/files/sales.txt'
 PREHOOK: type: CREATEFUNCTION
-#### A masked pattern was here ####
 PREHOOK: Output: database:default
 PREHOOK: Output: default.lookup
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask. Hive warehouse is non-local, but ../../data/files/sales.txt specifies file on local filesystem. Resources on non-local warehouse should specify a non-local scheme/path

Modified: hive/branches/spark/ql/src/test/results/clientnegative/udf_nonexistent_resource.q.out
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/results/clientnegative/udf_nonexistent_resource.q.out?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/results/clientnegative/udf_nonexistent_resource.q.out (original)
+++ hive/branches/spark/ql/src/test/results/clientnegative/udf_nonexistent_resource.q.out Mon Oct  6 03:44:13 2014
@@ -2,6 +2,5 @@ PREHOOK: query: create function lookup a
 PREHOOK: type: CREATEFUNCTION
 PREHOOK: Output: database:default
 PREHOOK: Output: default.lookup
-PREHOOK: Output: nonexistent_file.txt
 nonexistent_file.txt does not exist
 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask. nonexistent_file.txt does not exist

Modified: hive/branches/spark/ql/src/test/results/clientpositive/alter_merge_stats_orc.q.out
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/results/clientpositive/alter_merge_stats_orc.q.out?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/results/clientpositive/alter_merge_stats_orc.q.out (original)
+++ hive/branches/spark/ql/src/test/results/clientpositive/alter_merge_stats_orc.q.out Mon Oct  6 03:44:13 2014
@@ -65,11 +65,9 @@ value               	string             
 #### A masked pattern was here ####
 PREHOOK: query: analyze table src_orc_merge_test_stat compute statistics noscan
 PREHOOK: type: QUERY
-PREHOOK: Input: default@src_orc_merge_test_stat
 PREHOOK: Output: default@src_orc_merge_test_stat
 POSTHOOK: query: analyze table src_orc_merge_test_stat compute statistics noscan
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src_orc_merge_test_stat
 POSTHOOK: Output: default@src_orc_merge_test_stat
 PREHOOK: query: desc formatted  src_orc_merge_test_stat
 PREHOOK: type: DESCTABLE
@@ -117,11 +115,9 @@ POSTHOOK: Input: default@src_orc_merge_t
 POSTHOOK: Output: default@src_orc_merge_test_stat
 PREHOOK: query: analyze table src_orc_merge_test_stat compute statistics noscan
 PREHOOK: type: QUERY
-PREHOOK: Input: default@src_orc_merge_test_stat
 PREHOOK: Output: default@src_orc_merge_test_stat
 POSTHOOK: query: analyze table src_orc_merge_test_stat compute statistics noscan
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src_orc_merge_test_stat
 POSTHOOK: Output: default@src_orc_merge_test_stat
 PREHOOK: query: desc formatted src_orc_merge_test_stat
 PREHOOK: type: DESCTABLE
@@ -264,12 +260,10 @@ Storage Desc Params:	 	 
 	serialization.format	1                   
 PREHOOK: query: analyze table src_orc_merge_test_part_stat partition(ds='2011') compute statistics noscan
 PREHOOK: type: QUERY
-PREHOOK: Input: default@src_orc_merge_test_part_stat
 PREHOOK: Output: default@src_orc_merge_test_part_stat
 PREHOOK: Output: default@src_orc_merge_test_part_stat@ds=2011
 POSTHOOK: query: analyze table src_orc_merge_test_part_stat partition(ds='2011') compute statistics noscan
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src_orc_merge_test_part_stat
 POSTHOOK: Output: default@src_orc_merge_test_part_stat
 POSTHOOK: Output: default@src_orc_merge_test_part_stat@ds=2011
 PREHOOK: query: desc formatted src_orc_merge_test_part_stat partition (ds='2011')
@@ -323,12 +317,10 @@ POSTHOOK: Input: default@src_orc_merge_t
 POSTHOOK: Output: default@src_orc_merge_test_part_stat@ds=2011
 PREHOOK: query: analyze table src_orc_merge_test_part_stat partition(ds='2011') compute statistics noscan
 PREHOOK: type: QUERY
-PREHOOK: Input: default@src_orc_merge_test_part_stat
 PREHOOK: Output: default@src_orc_merge_test_part_stat
 PREHOOK: Output: default@src_orc_merge_test_part_stat@ds=2011
 POSTHOOK: query: analyze table src_orc_merge_test_part_stat partition(ds='2011') compute statistics noscan
 POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src_orc_merge_test_part_stat
 POSTHOOK: Output: default@src_orc_merge_test_part_stat
 POSTHOOK: Output: default@src_orc_merge_test_part_stat@ds=2011
 PREHOOK: query: desc formatted src_orc_merge_test_part_stat partition (ds='2011')

Modified: hive/branches/spark/ql/src/test/results/clientpositive/alter_partition_coltype.q.out
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/results/clientpositive/alter_partition_coltype.q.out?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
Files hive/branches/spark/ql/src/test/results/clientpositive/alter_partition_coltype.q.out (original) and hive/branches/spark/ql/src/test/results/clientpositive/alter_partition_coltype.q.out Mon Oct  6 03:44:13 2014 differ

Modified: hive/branches/spark/ql/src/test/results/clientpositive/annotate_stats_groupby.q.out
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/test/results/clientpositive/annotate_stats_groupby.q.out?rev=1629562&r1=1629561&r2=1629562&view=diff
==============================================================================
--- hive/branches/spark/ql/src/test/results/clientpositive/annotate_stats_groupby.q.out (original)
+++ hive/branches/spark/ql/src/test/results/clientpositive/annotate_stats_groupby.q.out Mon Oct  6 03:44:13 2014
@@ -1,24 +1,4 @@
-PREHOOK: query: -- hash aggregation is disabled
-
--- There are different cases for Group By depending on map/reduce side, hash aggregation,
--- grouping sets and column stats. If we don't have column stats, we just assume hash
--- aggregation is disabled. Following are the possible cases and rule for cardinality
--- estimation
-
--- MAP SIDE:
--- Case 1: NO column stats, NO hash aggregation, NO grouping sets — numRows
--- Case 2: NO column stats, NO hash aggregation, grouping sets — numRows * sizeOfGroupingSet
--- Case 3: column stats, hash aggregation, NO grouping sets — Min(numRows / 2, ndvProduct * parallelism)
--- Case 4: column stats, hash aggregation, grouping sets — Min((numRows * sizeOfGroupingSet) / 2, ndvProduct * parallelism * sizeOfGroupingSet)
--- Case 5: column stats, NO hash aggregation, NO grouping sets — numRows
--- Case 6: column stats, NO hash aggregation, grouping sets — numRows * sizeOfGroupingSet
-
--- REDUCE SIDE:
--- Case 7: NO column stats — numRows / 2
--- Case 8: column stats, grouping sets — Min(numRows, ndvProduct * sizeOfGroupingSet)
--- Case 9: column stats, NO grouping sets - Min(numRows, ndvProduct)
-
-create table if not exists loc_staging (
+PREHOOK: query: create table if not exists loc_staging (
   state string,
   locid int,
   zip bigint,
@@ -27,27 +7,7 @@ create table if not exists loc_staging (
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@loc_staging
-POSTHOOK: query: -- hash aggregation is disabled
-
--- There are different cases for Group By depending on map/reduce side, hash aggregation,
--- grouping sets and column stats. If we don't have column stats, we just assume hash
--- aggregation is disabled. Following are the possible cases and rule for cardinality
--- estimation
-
--- MAP SIDE:
--- Case 1: NO column stats, NO hash aggregation, NO grouping sets — numRows
--- Case 2: NO column stats, NO hash aggregation, grouping sets — numRows * sizeOfGroupingSet
--- Case 3: column stats, hash aggregation, NO grouping sets — Min(numRows / 2, ndvProduct * parallelism)
--- Case 4: column stats, hash aggregation, grouping sets — Min((numRows * sizeOfGroupingSet) / 2, ndvProduct * parallelism * sizeOfGroupingSet)
--- Case 5: column stats, NO hash aggregation, NO grouping sets — numRows
--- Case 6: column stats, NO hash aggregation, grouping sets — numRows * sizeOfGroupingSet
-
--- REDUCE SIDE:
--- Case 7: NO column stats — numRows / 2
--- Case 8: column stats, grouping sets — Min(numRows, ndvProduct * sizeOfGroupingSet)
--- Case 9: column stats, NO grouping sets - Min(numRows, ndvProduct)
-
-create table if not exists loc_staging (
+POSTHOOK: query: create table if not exists loc_staging (
   state string,
   locid int,
   zip bigint,
@@ -230,20 +190,22 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: analyze table loc_orc compute statistics for columns state,locid,year
+PREHOOK: query: analyze table loc_orc compute statistics for columns state,locid,zip,year
 PREHOOK: type: QUERY
 PREHOOK: Input: default@loc_orc
 #### A masked pattern was here ####
-POSTHOOK: query: analyze table loc_orc compute statistics for columns state,locid,year
+POSTHOOK: query: analyze table loc_orc compute statistics for columns state,locid,zip,year
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@loc_orc
 #### A masked pattern was here ####
-PREHOOK: query: -- Case 5: column stats, NO hash aggregation, NO grouping sets - cardinality = 8
--- Case 9: column stats, NO grouping sets - caridnality = 2
+PREHOOK: query: -- only one distinct value in year column + 1 NULL value
+-- map-side GBY: numRows: 8 (map-side will not do any reduction)
+-- reduce-side GBY: numRows: 2
 explain select year from loc_orc group by year
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 5: column stats, NO hash aggregation, NO grouping sets - cardinality = 8
--- Case 9: column stats, NO grouping sets - caridnality = 2
+POSTHOOK: query: -- only one distinct value in year column + 1 NULL value
+-- map-side GBY: numRows: 8 (map-side will not do any reduction)
+-- reduce-side GBY: numRows: 2
 explain select year from loc_orc group by year
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -295,12 +257,12 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 5: column stats, NO hash aggregation, NO grouping sets - cardinality = 8
--- Case 9: column stats, NO grouping sets - caridnality = 8
+PREHOOK: query: -- map-side GBY: numRows: 8
+-- reduce-side GBY: numRows: 4
 explain select state,locid from loc_orc group by state,locid
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 5: column stats, NO hash aggregation, NO grouping sets - cardinality = 8
--- Case 9: column stats, NO grouping sets - caridnality = 8
+POSTHOOK: query: -- map-side GBY: numRows: 8
+-- reduce-side GBY: numRows: 4
 explain select state,locid from loc_orc group by state,locid
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -333,14 +295,14 @@ STAGE PLANS:
           keys: KEY._col0 (type: string), KEY._col1 (type: int)
           mode: mergepartial
           outputColumnNames: _col0, _col1
-          Statistics: Num rows: 8 Data size: 720 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 4 Data size: 360 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 8 Data size: 720 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 4 Data size: 360 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 8 Data size: 720 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 4 Data size: 360 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -352,12 +314,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 32
--- Case 8: column stats, grouping sets - cardinality = 32
+PREHOOK: query: -- map-side GBY numRows: 32 reduce-side GBY numRows: 16
 explain select state,locid from loc_orc group by state,locid with cube
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 32
--- Case 8: column stats, grouping sets - cardinality = 32
+POSTHOOK: query: -- map-side GBY numRows: 32 reduce-side GBY numRows: 16
 explain select state,locid from loc_orc group by state,locid with cube
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -379,25 +339,25 @@ STAGE PLANS:
                 keys: state (type: string), locid (type: int), '0' (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 32 Data size: 5600 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 32 Data size: 3184 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string)
                   sort order: +++
                   Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string)
-                  Statistics: Num rows: 32 Data size: 5600 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 32 Data size: 3184 Basic stats: COMPLETE Column stats: COMPLETE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 32 Data size: 5600 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 16 Data size: 2800 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 32 Data size: 2880 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 16 Data size: 1440 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 32 Data size: 2880 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 16 Data size: 1440 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -409,12 +369,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 24
--- Case 8: column stats, grouping sets - cardinality = 24
+PREHOOK: query: -- map-side GBY numRows: 24 reduce-side GBY numRows: 12
 explain select state,locid from loc_orc group by state,locid with rollup
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 24
--- Case 8: column stats, grouping sets - cardinality = 24
+POSTHOOK: query: -- map-side GBY numRows: 24 reduce-side GBY numRows: 12
 explain select state,locid from loc_orc group by state,locid with rollup
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -436,25 +394,25 @@ STAGE PLANS:
                 keys: state (type: string), locid (type: int), '0' (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 24 Data size: 4200 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 24 Data size: 2388 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string)
                   sort order: +++
                   Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string)
-                  Statistics: Num rows: 24 Data size: 4200 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 24 Data size: 2388 Basic stats: COMPLETE Column stats: COMPLETE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 24 Data size: 4200 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 12 Data size: 2100 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 24 Data size: 2160 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 12 Data size: 1080 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 24 Data size: 2160 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 12 Data size: 1080 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -466,12 +424,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 8
--- Case 8: column stats, grouping sets - cardinality = 8
+PREHOOK: query: -- map-side GBY numRows: 8 reduce-side GBY numRows: 4
 explain select state,locid from loc_orc group by state,locid grouping sets((state))
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 8
--- Case 8: column stats, grouping sets - cardinality = 8
+POSTHOOK: query: -- map-side GBY numRows: 8 reduce-side GBY numRows: 4
 explain select state,locid from loc_orc group by state,locid grouping sets((state))
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -493,25 +449,25 @@ STAGE PLANS:
                 keys: state (type: string), locid (type: int), '0' (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 8 Data size: 1400 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 8 Data size: 796 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string)
                   sort order: +++
                   Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string)
-                  Statistics: Num rows: 8 Data size: 1400 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 8 Data size: 796 Basic stats: COMPLETE Column stats: COMPLETE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 8 Data size: 1400 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 4 Data size: 700 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 8 Data size: 720 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 4 Data size: 360 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 8 Data size: 720 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 4 Data size: 360 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -523,12 +479,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 16
--- Case 8: column stats, grouping sets - cardinality = 16
+PREHOOK: query: -- map-side GBY numRows: 16 reduce-side GBY numRows: 8
 explain select state,locid from loc_orc group by state,locid grouping sets((state),(locid))
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 16
--- Case 8: column stats, grouping sets - cardinality = 16
+POSTHOOK: query: -- map-side GBY numRows: 16 reduce-side GBY numRows: 8
 explain select state,locid from loc_orc group by state,locid grouping sets((state),(locid))
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -550,25 +504,25 @@ STAGE PLANS:
                 keys: state (type: string), locid (type: int), '0' (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 16 Data size: 2800 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 16 Data size: 1592 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string)
                   sort order: +++
                   Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string)
-                  Statistics: Num rows: 16 Data size: 2800 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 16 Data size: 1592 Basic stats: COMPLETE Column stats: COMPLETE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 16 Data size: 2800 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 8 Data size: 1400 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 16 Data size: 1440 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 8 Data size: 720 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 16 Data size: 1440 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 8 Data size: 720 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -580,12 +534,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 24
--- Case 8: column stats, grouping sets - cardinality = 24
+PREHOOK: query: -- map-side GBY numRows: 24 reduce-side GBY numRows: 12
 explain select state,locid from loc_orc group by state,locid grouping sets((state),(locid),())
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 24
--- Case 8: column stats, grouping sets - cardinality = 24
+POSTHOOK: query: -- map-side GBY numRows: 24 reduce-side GBY numRows: 12
 explain select state,locid from loc_orc group by state,locid grouping sets((state),(locid),())
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -607,25 +559,25 @@ STAGE PLANS:
                 keys: state (type: string), locid (type: int), '0' (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 24 Data size: 4200 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 24 Data size: 2388 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string)
                   sort order: +++
                   Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string)
-                  Statistics: Num rows: 24 Data size: 4200 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 24 Data size: 2388 Basic stats: COMPLETE Column stats: COMPLETE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 24 Data size: 4200 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 12 Data size: 2100 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 24 Data size: 2160 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 12 Data size: 1080 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 24 Data size: 2160 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 12 Data size: 1080 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -637,12 +589,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 32
--- Case 8: column stats, grouping sets - cardinality = 32
+PREHOOK: query: -- map-side GBY numRows: 32 reduce-side GBY numRows: 16
 explain select state,locid from loc_orc group by state,locid grouping sets((state,locid),(state),(locid),())
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 6: column stats, NO hash aggregation, grouping sets - cardinality = 32
--- Case 8: column stats, grouping sets - cardinality = 32
+POSTHOOK: query: -- map-side GBY numRows: 32 reduce-side GBY numRows: 16
 explain select state,locid from loc_orc group by state,locid grouping sets((state,locid),(state),(locid),())
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -664,25 +614,25 @@ STAGE PLANS:
                 keys: state (type: string), locid (type: int), '0' (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 32 Data size: 5600 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 32 Data size: 3184 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string)
                   sort order: +++
                   Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string)
-                  Statistics: Num rows: 32 Data size: 5600 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 32 Data size: 3184 Basic stats: COMPLETE Column stats: COMPLETE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 32 Data size: 5600 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 16 Data size: 2800 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 32 Data size: 2880 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 16 Data size: 1440 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 32 Data size: 2880 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 16 Data size: 1440 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -694,16 +644,12 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- map-side parallelism will be 10
-
--- Case 3: column stats, hash aggregation, NO grouping sets - cardinality = 4
--- Case 9: column stats, NO grouping sets - caridnality = 2
+PREHOOK: query: -- map-side GBY: numRows: 80 (map-side will not do any reduction)
+-- reduce-side GBY: numRows: 2 Reason: numDistinct of year is 2. numRows = min(80/2, 2)
 explain select year from loc_orc group by year
 PREHOOK: type: QUERY
-POSTHOOK: query: -- map-side parallelism will be 10
-
--- Case 3: column stats, hash aggregation, NO grouping sets - cardinality = 4
--- Case 9: column stats, NO grouping sets - caridnality = 2
+POSTHOOK: query: -- map-side GBY: numRows: 80 (map-side will not do any reduction)
+-- reduce-side GBY: numRows: 2 Reason: numDistinct of year is 2. numRows = min(80/2, 2)
 explain select year from loc_orc group by year
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -725,25 +671,25 @@ STAGE PLANS:
                 keys: year (type: int)
                 mode: hash
                 outputColumnNames: _col0
-                Statistics: Num rows: 4 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 80 Data size: 280 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: 4 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 80 Data size: 280 Basic stats: COMPLETE Column stats: COMPLETE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: int)
           mode: mergepartial
           outputColumnNames: _col0
-          Statistics: Num rows: 2 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: int)
             outputColumnNames: _col0
-            Statistics: Num rows: 2 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
+            Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 2 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
+              Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -755,12 +701,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 4: column stats, hash aggregation, grouping sets - cardinality = 16
--- Case 8: column stats, grouping sets - cardinality = 16
+PREHOOK: query: -- map-side GBY numRows: 320 reduce-side GBY numRows: 42 Reason: numDistinct of state and locid are 6,7 resp. numRows = min(320/2, 6*7)
 explain select state,locid from loc_orc group by state,locid with cube
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 4: column stats, hash aggregation, grouping sets - cardinality = 16
--- Case 8: column stats, grouping sets - cardinality = 16
+POSTHOOK: query: -- map-side GBY numRows: 320 reduce-side GBY numRows: 42 Reason: numDistinct of state and locid are 6,7 resp. numRows = min(320/2, 6*7)
 explain select state,locid from loc_orc group by state,locid with cube
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -782,84 +726,25 @@ STAGE PLANS:
                 keys: state (type: string), locid (type: int), '0' (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 16 Data size: 2800 Basic stats: COMPLETE Column stats: COMPLETE
+                Statistics: Num rows: 320 Data size: 31840 Basic stats: COMPLETE Column stats: COMPLETE
                 Reduce Output Operator
                   key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string)
                   sort order: +++
                   Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string)
-                  Statistics: Num rows: 16 Data size: 2800 Basic stats: COMPLETE Column stats: COMPLETE
+                  Statistics: Num rows: 320 Data size: 31840 Basic stats: COMPLETE Column stats: COMPLETE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 16 Data size: 2800 Basic stats: COMPLETE Column stats: COMPLETE
+          Statistics: Num rows: 35 Data size: 6125 Basic stats: COMPLETE Column stats: COMPLETE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 16 Data size: 1440 Basic stats: COMPLETE Column stats: COMPLETE
-            File Output Operator
-              compressed: false
-              Statistics: Num rows: 16 Data size: 1440 Basic stats: COMPLETE Column stats: COMPLETE
-              table:
-                  input format: org.apache.hadoop.mapred.TextInputFormat
-                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        ListSink
-
-PREHOOK: query: -- ndvProduct becomes 0 as zip does not have column stats
--- Case 3: column stats, hash aggregation, NO grouping sets - cardinality = 4
--- Case 9: column stats, NO grouping sets - caridnality = 2
-explain select state,zip from loc_orc group by state,zip
-PREHOOK: type: QUERY
-POSTHOOK: query: -- ndvProduct becomes 0 as zip does not have column stats
--- Case 3: column stats, hash aggregation, NO grouping sets - cardinality = 4
--- Case 9: column stats, NO grouping sets - caridnality = 2
-explain select state,zip from loc_orc group by state,zip
-POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
-
-STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: loc_orc
-            Statistics: Num rows: 8 Data size: 796 Basic stats: COMPLETE Column stats: PARTIAL
-            Select Operator
-              expressions: state (type: string), zip (type: bigint)
-              outputColumnNames: state, zip
-              Statistics: Num rows: 8 Data size: 796 Basic stats: COMPLETE Column stats: PARTIAL
-              Group By Operator
-                keys: state (type: string), zip (type: bigint)
-                mode: hash
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 4 Data size: 344 Basic stats: COMPLETE Column stats: PARTIAL
-                Reduce Output Operator
-                  key expressions: _col0 (type: string), _col1 (type: bigint)
-                  sort order: ++
-                  Map-reduce partition columns: _col0 (type: string), _col1 (type: bigint)
-                  Statistics: Num rows: 4 Data size: 344 Basic stats: COMPLETE Column stats: PARTIAL
-      Reduce Operator Tree:
-        Group By Operator
-          keys: KEY._col0 (type: string), KEY._col1 (type: bigint)
-          mode: mergepartial
-          outputColumnNames: _col0, _col1
-          Statistics: Num rows: 2 Data size: 172 Basic stats: COMPLETE Column stats: PARTIAL
-          Select Operator
-            expressions: _col0 (type: string), _col1 (type: bigint)
-            outputColumnNames: _col0, _col1
-            Statistics: Num rows: 2 Data size: 172 Basic stats: COMPLETE Column stats: PARTIAL
+            Statistics: Num rows: 35 Data size: 3150 Basic stats: COMPLETE Column stats: COMPLETE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 2 Data size: 172 Basic stats: COMPLETE Column stats: PARTIAL
+              Statistics: Num rows: 35 Data size: 3150 Basic stats: COMPLETE Column stats: COMPLETE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -871,12 +756,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 32
--- Case 7: NO column stats - cardinality = 16
+PREHOOK: query: -- map-side GBY numRows: 32 reduce-side GBY numRows: 16
 explain select state,locid from loc_orc group by state,locid with cube
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 32
--- Case 7: NO column stats - cardinality = 16
+POSTHOOK: query: -- map-side GBY numRows: 32 reduce-side GBY numRows: 16
 explain select state,locid from loc_orc group by state,locid with cube
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -928,12 +811,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 24
--- Case 7: NO column stats - cardinality = 12
+PREHOOK: query: -- map-side GBY numRows: 24 reduce-side GBY numRows: 12
 explain select state,locid from loc_orc group by state,locid with rollup
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 24
--- Case 7: NO column stats - cardinality = 12
+POSTHOOK: query: -- map-side GBY numRows: 24 reduce-side GBY numRows: 12
 explain select state,locid from loc_orc group by state,locid with rollup
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -985,12 +866,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 8
--- Case 7: NO column stats - cardinality = 4
+PREHOOK: query: -- map-side GBY numRows: 8 reduce-side GBY numRows: 4
 explain select state,locid from loc_orc group by state,locid grouping sets((state))
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 8
--- Case 7: NO column stats - cardinality = 4
+POSTHOOK: query: -- map-side GBY numRows: 8 reduce-side GBY numRows: 4
 explain select state,locid from loc_orc group by state,locid grouping sets((state))
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -1042,12 +921,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 16
--- Case 7: NO column stats - cardinality = 8
+PREHOOK: query: -- map-side GBY numRows: 16 reduce-side GBY numRows: 8
 explain select state,locid from loc_orc group by state,locid grouping sets((state),(locid))
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 16
--- Case 7: NO column stats - cardinality = 8
+POSTHOOK: query: -- map-side GBY numRows: 16 reduce-side GBY numRows: 8
 explain select state,locid from loc_orc group by state,locid grouping sets((state),(locid))
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -1099,12 +976,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 24
--- Case 7: NO column stats - cardinality = 12
+PREHOOK: query: -- map-side GBY numRows: 24 reduce-side GBY numRows: 12
 explain select state,locid from loc_orc group by state,locid grouping sets((state),(locid),())
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 24
--- Case 7: NO column stats - cardinality = 12
+POSTHOOK: query: -- map-side GBY numRows: 24 reduce-side GBY numRows: 12
 explain select state,locid from loc_orc group by state,locid grouping sets((state),(locid),())
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -1156,12 +1031,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 32
--- Case 7: NO column stats - cardinality = 16
+PREHOOK: query: -- map-side GBY numRows: 32 reduce-side GBY numRows: 16
 explain select state,locid from loc_orc group by state,locid grouping sets((state,locid),(state),(locid),())
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 32
--- Case 7: NO column stats - cardinality = 16
+POSTHOOK: query: -- map-side GBY numRows: 32 reduce-side GBY numRows: 16
 explain select state,locid from loc_orc group by state,locid grouping sets((state,locid),(state),(locid),())
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -1213,12 +1086,12 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 1: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 8
--- Case 7: NO column stats - cardinality = 4
+PREHOOK: query: -- map-side GBY: numRows: 80 (map-side will not do any reduction)
+-- reduce-side GBY: numRows: 2 Reason: numDistinct of year is 2. numRows = min(80/2, 2)
 explain select year from loc_orc group by year
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 1: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 8
--- Case 7: NO column stats - cardinality = 4
+POSTHOOK: query: -- map-side GBY: numRows: 80 (map-side will not do any reduction)
+-- reduce-side GBY: numRows: 2 Reason: numDistinct of year is 2. numRows = min(80/2, 2)
 explain select year from loc_orc group by year
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -1240,25 +1113,25 @@ STAGE PLANS:
                 keys: year (type: int)
                 mode: hash
                 outputColumnNames: _col0
-                Statistics: Num rows: 8 Data size: 796 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 80 Data size: 7960 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: int)
                   sort order: +
                   Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 8 Data size: 796 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 80 Data size: 7960 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: int)
           mode: mergepartial
           outputColumnNames: _col0
-          Statistics: Num rows: 4 Data size: 398 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 40 Data size: 3980 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: _col0 (type: int)
             outputColumnNames: _col0
-            Statistics: Num rows: 4 Data size: 398 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 40 Data size: 3980 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 4 Data size: 398 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 40 Data size: 3980 Basic stats: COMPLETE Column stats: NONE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -1270,12 +1143,10 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 32
--- Case 7: NO column stats - cardinality = 16
+PREHOOK: query: -- map-side GBY numRows: 320 reduce-side GBY numRows: 42 Reason: numDistinct of state and locid are 6,7 resp. numRows = min(320/2, 6*7)
 explain select state,locid from loc_orc group by state,locid with cube
 PREHOOK: type: QUERY
-POSTHOOK: query: -- Case 2: NO column stats, NO hash aggregation, NO grouping sets - cardinality = 32
--- Case 7: NO column stats - cardinality = 16
+POSTHOOK: query: -- map-side GBY numRows: 320 reduce-side GBY numRows: 42 Reason: numDistinct of state and locid are 6,7 resp. numRows = min(320/2, 6*7)
 explain select state,locid from loc_orc group by state,locid with cube
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
@@ -1297,25 +1168,25 @@ STAGE PLANS:
                 keys: state (type: string), locid (type: int), '0' (type: string)
                 mode: hash
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 32 Data size: 3184 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 320 Data size: 31840 Basic stats: COMPLETE Column stats: NONE
                 Reduce Output Operator
                   key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string)
                   sort order: +++
                   Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string)
-                  Statistics: Num rows: 32 Data size: 3184 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 320 Data size: 31840 Basic stats: COMPLETE Column stats: NONE
       Reduce Operator Tree:
         Group By Operator
           keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string)
           mode: mergepartial
           outputColumnNames: _col0, _col1, _col2
-          Statistics: Num rows: 16 Data size: 1592 Basic stats: COMPLETE Column stats: NONE
+          Statistics: Num rows: 160 Data size: 15920 Basic stats: COMPLETE Column stats: NONE
           Select Operator
             expressions: _col0 (type: string), _col1 (type: int)
             outputColumnNames: _col0, _col1
-            Statistics: Num rows: 16 Data size: 1592 Basic stats: COMPLETE Column stats: NONE
+            Statistics: Num rows: 160 Data size: 15920 Basic stats: COMPLETE Column stats: NONE
             File Output Operator
               compressed: false
-              Statistics: Num rows: 16 Data size: 1592 Basic stats: COMPLETE Column stats: NONE
+              Statistics: Num rows: 160 Data size: 15920 Basic stats: COMPLETE Column stats: NONE
               table:
                   input format: org.apache.hadoop.mapred.TextInputFormat
                   output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat



Mime
View raw message