hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject hive git commit: HIVE-13394: Analyze table fails in tez on empty partitions (Vikram Dixit K, reviewed by Prasanth Jayachandran)
Date Tue, 05 Apr 2016 18:34:11 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1.2 838eef986 -> eaab5dbed


HIVE-13394: Analyze table fails in tez on empty partitions (Vikram Dixit K, reviewed by Prasanth
Jayachandran)


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

Branch: refs/heads/branch-1.2
Commit: eaab5dbedd57f326761ff464a2cd2467b32614da
Parents: 838eef9
Author: vikram <vikram@hortonworks.com>
Authored: Tue Apr 5 11:30:40 2016 -0700
Committer: vikram <vikram@hortonworks.com>
Committed: Tue Apr 5 11:30:40 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/eaab5dbe/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
index 274330b..627d4c5 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java
@@ -535,6 +535,9 @@ public class GenericUDAFComputeStats extends AbstractGenericUDAFResolver
{
         if (myagg.numDV == null) {
           Object partialValue = soi.getStructFieldData(partial, numBitVectorsField);
           int numVectors = numBitVectorsFieldOI.get(partialValue);
+          if (numVectors <= 0) {
+            return;
+          }
           myagg.initNDVEstimator(numVectors);
         }
 
@@ -954,6 +957,9 @@ public class GenericUDAFComputeStats extends AbstractGenericUDAFResolver
{
         if (myagg.firstItem) {
           Object partialValue = soi.getStructFieldData(partial, numBitVectorsField);
           int numVectors = numBitVectorsFieldOI.get(partialValue);
+          if (numVectors <= 0) {
+            return;
+          }
           initNDVEstimator(myagg, numVectors);
           myagg.firstItem = false;
           myagg.numBitVectors = numVectors;


Mime
View raw message