konstantinb commented on code in PR #6505:
URL: https://github.com/apache/hive/pull/6505#discussion_r4475452013
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java:
##########
@@ -1381,6 +1384,16 @@ private long evaluateChildExpr(Statistics stats,
ExprNodeDesc child,
return numRows / 2;
}
+ private static long rowsAfterEqualityFilter(long numRows, long dvs) {
+ if (dvs < 0) {
+ return numRows / 2;
+ }
+ if (dvs == 0) {
+ return 0;
Review Comment:
Fixed in
[dcaac90](https://github.com/apache/hive/pull/6505/commits/dcaac90c35) for the
case this PR introduced: a verified-zero NDV means every row is NULL, so col
<=> NULL (either operand order) now keeps all rows. Unknown and known NDVs keep
master's estimates; using numNulls there too would change master's behavior, so
that's left for a follow-up.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]