okumin commented on code in PR #6505:
URL: https://github.com/apache/hive/pull/6505#discussion_r4675031550
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java:
##########
@@ -1822,6 +1842,11 @@ private boolean checkMapSideAggregation(GroupByOperator
gop,
long avgKeySize = 0;
for (ColStatistics cs : colStats) {
if (cs != null) {
+ if (cs.getCountDistint() < 0) {
+ // unknown NDV: the hash table cannot be sized. Keep the
decision made when unknown
+ // was stored as 0: an empty estimated table, so only the memory
budget matters.
+ return maxMemHashAgg > 0;
Review Comment:
Does this condition make sense after we merge this PR? I suspect this
formula is too influenced by the original implementation that abused NDV = 0
for two semantics.
--
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]