okumin commented on code in PR #5337: URL: https://github.com/apache/hive/pull/5337#discussion_r1681352422
########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java: ########## @@ -557,14 +557,17 @@ private long evaluateInExpr(Statistics stats, ExprNodeDesc pred, long currNumRow } for (int i = 0; i < columnStats.size(); i++) { long dvs = columnStats.get(i) == null ? 0 : columnStats.get(i).getCountDistint(); - long intersectionSize = estimateIntersectionSize(aspCtx.getConf(), columnStats.get(i), values.get(i)); + if (dvs == 0) { + factor *= 0.5; Review Comment: Can we use [this property](https://github.com/apache/hive/blob/rel/release-4.0.0/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java#L575) to tune the factor? It could not directly support your original intention, but it will likely work. If `multiColum` is false, it would work as you expected. If `multiColumn` is true, 0.1 per column could lead to underestimation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org