englefly commented on code in PR #25137:
URL: https://github.com/apache/doris/pull/25137#discussion_r1350048983


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java:
##########
@@ -165,8 +165,14 @@ public Void visitPhysicalHashJoin(PhysicalHashJoin<? 
extends Plan, ? extends Pla
         if (JoinUtils.couldShuffle(hashJoin)) {
             addShuffleJoinRequestProperty(hashJoin);
         }
+
         // for broadcast join
-        if (JoinUtils.couldBroadcast(hashJoin)) {
+        double memLimit = 
ConnectContext.get().getSessionVariable().getMaxExecMemByte();
+        double rowsLimit = 
ConnectContext.get().getSessionVariable().getBroadcastRowCountLimit();
+        double brMemlimit = 
ConnectContext.get().getSessionVariable().getBroadcastHashtableMemLimitPercentage();
+        double datasize = 
hashJoin.getGroupExpression().get().child(1).getStatistics().computeSize();
+        double rowCount = 
hashJoin.getGroupExpression().get().child(1).getStatistics().getRowCount();
+        if (JoinUtils.couldBroadcast(hashJoin) && rowCount <= rowsLimit && 
datasize <= memLimit * brMemlimit) {

Review Comment:
   please remove memcheck and rowcount check from 
CostModelV1.visitPhysicalDistribute()



-- 
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]

Reply via email to