----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50575/#review144102 -----------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java (line 1440) <https://reviews.apache.org/r/50575/#comment210115> Because if this column is projecting constant null then numRows = cs.getNumNulls() so rowCnt becomes 0 and then we estimate 0 size for this column. After this change we will estimate size corresponding to 1 object which is null which makes sense since values for this column in all rows corresponds to single object which has null in it. - Ashutosh Chauhan On July 28, 2016, 5:47 p.m., Ashutosh Chauhan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/50575/ > ----------------------------------------------------------- > > (Updated July 28, 2016, 5:47 p.m.) > > > Review request for hive and Jesús Camacho Rodríguez. > > > Bugs: HIVE-14367 > https://issues.apache.org/jira/browse/HIVE-14367 > > > Repository: hive-git > > > Description > ------- > > Estimated size of constant nulls is 0 in some cases > > > Diffs > ----- > > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java > 42cbc14 > ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java 7a15904 > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMax.java > 43b23fa > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMin.java > 70e0db1 > ql/src/test/queries/clientpositive/vector_coalesce.q b1a7766 > ql/src/test/results/clientpositive/decimal_stats.q.out 6bcf3fa > ql/src/test/results/clientpositive/tez/vector_coalesce.q.out e65245e > > Diff: https://reviews.apache.org/r/50575/diff/ > > > Testing > ------- > > > Thanks, > > Ashutosh Chauhan > >