hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sp...@apache.org
Subject [10/50] [abbrv] hive git commit: HIVE-10690: ArrayIndexOutOfBounds exception in MetaStoreDirectSql.aggrColStatsForPartitions() (Vaibhav Gumashta reviewed by Jason Dere)
Date Wed, 20 May 2015 16:01:29 GMT
HIVE-10690: ArrayIndexOutOfBounds exception in MetaStoreDirectSql.aggrColStatsForPartitions()
(Vaibhav Gumashta reviewed by Jason Dere)


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

Branch: refs/heads/parquet
Commit: 31383348c1bd32b7991a20b793a362cca19987e9
Parents: 03eca77
Author: Vaibhav Gumashta <vgumashta@apache.org>
Authored: Wed May 13 13:44:41 2015 -0700
Committer: Vaibhav Gumashta <vgumashta@apache.org>
Committed: Wed May 13 13:44:41 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hive/metastore/MetaStoreDirectSql.java  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/31383348/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java b/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
index 8bee978..0a56bac 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
@@ -1129,10 +1129,12 @@ class MetaStoreDirectSql {
             colStatsAggrFromDB =
                 columnStatisticsObjForPartitions(dbName, tableName, partNames, colNamesForDB,
                     partsFound, useDensityFunctionForNDVEstimation);
-            ColumnStatisticsObj colStatsAggr = colStatsAggrFromDB.get(0);
-            colStatsList.add(colStatsAggr);
-            // Update the cache to add this new aggregate node
-            aggrStatsCache.add(dbName, tableName, colName, partsFound, colStatsAggr, bloomFilter);
+            if (!colStatsAggrFromDB.isEmpty()) {
+              ColumnStatisticsObj colStatsAggr = colStatsAggrFromDB.get(0);
+              colStatsList.add(colStatsAggr);
+              // Update the cache to add this new aggregate node
+              aggrStatsCache.add(dbName, tableName, colName, partsFound, colStatsAggr, bloomFilter);
+            }
           }
         }
       }


Mime
View raw message