----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25179/#review52079 -----------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdRowCount.java <https://reviews.apache.org/r/25179/#comment90814> My concern is that the computation of selectivity doesn't take into account differences in NDV which can result in under estimation. ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdUniqueKeys.java <https://reviews.apache.org/r/25179/#comment90816> Currently NDV in the stats is not accurate. As you mentioned max(col) - min(col) is more accurate, hence we are less likely to see this code in effect due to inaccuracies in NDV. Is it possible to add some logging statements for : Table name, column name, row count, NDV , min and max ? - Mostafa Mokhtar On Sept. 2, 2014, 8:23 p.m., Harish Butani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25179/ > ----------------------------------------------------------- > > (Updated Sept. 2, 2014, 8:23 p.m.) > > > Review request for hive, Gunther Hagleitner, John Pullokkaran, and Mostafa > Mokhtar. > > > Repository: hive-git > > > Description > ------- > > CBO: more cost model changes > > > Diffs > ----- > > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/HiveDefaultRelMetadataProvider.java > 2c08772 > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdRowCount.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdSelectivity.java > df70de2 > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/stats/HiveRelMdUniqueKeys.java > PRE-CREATION > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 6c293c8 > > Diff: https://reviews.apache.org/r/25179/diff/ > > > Testing > ------- > > existing tests. > > > Thanks, > > Harish Butani > >