> On Jan. 17, 2017, 3:46 p.m., Yongzhi Chen wrote: > > ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/BasePartitionEvaluator.java, > > line 132 > > <https://reviews.apache.org/r/55623/diff/1/?file=1606557#file1606557line132> > > > > Is that possible sum is not null, numRows == 0 ?
I was also thinking about that. :) I checked the logic. Seems if numRows == 0, then sum should be null. We shouldn't run into sum / 0 situation. - Aihua ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55623/#review161875 ----------------------------------------------------------- On Jan. 17, 2017, 3:02 p.m., Aihua Xu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55623/ > ----------------------------------------------------------- > > (Updated Jan. 17, 2017, 3:02 p.m.) > > > Review request for hive. > > > Repository: hive-git > > > Description > ------- > > HIVE-15617: Improve the avg performance for Range based window > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java > 5ad5c0628f19dabf17191c08e0b14f8e2b1391e8 > ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/BasePartitionEvaluator.java > f5f9f7bb8980636fa364001c5508c215b304b9eb > > Diff: https://reviews.apache.org/r/55623/diff/ > > > Testing > ------- > > > Thanks, > > Aihua Xu > >