xzj7019 commented on code in PR #24462:
URL: https://github.com/apache/doris/pull/24462#discussion_r1327218295


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/JoinEstimation.java:
##########
@@ -137,7 +137,7 @@ private static Statistics estimateHashJoin(Statistics 
leftStats, Statistics righ
             outputRowCount = outputRowCount * Math.pow(0.9, 
unTrustableCondition.size());
         } else {
             outputRowCount = Math.max(leftStats.getRowCount(), 
rightStats.getRowCount());
-            Optional<Double> ratio = 
unTrustEqualRatio.stream().max(Double::compareTo);
+            Optional<Double> ratio = 
unTrustEqualRatio.stream().min(Double::compareTo);

Review Comment:
   would better to make a policy for mutiple column ndv estimation based on 
reversed order, similar with policy in gby? 



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to