You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pr...@apache.org on 2014/08/29 09:41:56 UTC
svn commit: r1621250 -
/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
Author: prasanthj
Date: Fri Aug 29 07:41:56 2014
New Revision: 1621250
URL: http://svn.apache.org/r1621250
Log:
HIVE-7904: Missing null check cause NPE when updating join column stats in statistics annotation (Prasanth J reviewed by Gunther Hagleitner)
Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java?rev=1621250&r1=1621249&r2=1621250&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java Fri Aug 29 07:41:56 2014
@@ -104,7 +104,8 @@ public class StatsRulesProcFactory {
tsop.setStatistics(stats.clone());
if (LOG.isDebugEnabled()) {
- LOG.debug("[0] STATS-" + tsop.toString() + ": " + stats.extendedToString());
+ LOG.debug("[0] STATS-" + tsop.toString() + " (" + table.getTableName()
+ + "): " + stats.extendedToString());
}
} catch (CloneNotSupportedException e) {
throw new SemanticException(ErrorMsg.STATISTICS_CLONING_FAILED.getMsg());
@@ -1092,7 +1093,9 @@ public class StatsRulesProcFactory {
String key = entry.getValue().get(joinColIdx);
key = StatsUtils.stripPrefixFromColumnName(key);
ColStatistics cs = joinedColStats.get(key);
- cs.setCountDistint(minNDV);
+ if (cs != null) {
+ cs.setCountDistint(minNDV);
+ }
}
}