hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesús Camacho Rodríguez <jcamachorodrig...@hortonworks.com>
Subject Re: Review Request 50575: Estimated size of constant nulls is 0 in some cases
Date Fri, 29 Jul 2016 15:31:13 GMT


> On July 29, 2016, 3:20 p.m., Ashutosh Chauhan wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java, line 1461
> > <https://reviews.apache.org/r/50575/diff/1/?file=1456638#file1456638line1461>
> >
> >     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.

OK, I think I got it. But to be precise, shouldn't we do nonNullCount += 1 if cs.getNumNulls()
>= 1?


- Jesús


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50575/#review144102
-----------------------------------------------------------


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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message