xzj7019 commented on code in PR #20713: URL: https://github.com/apache/doris/pull/20713#discussion_r1231827382
########## fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java: ########## @@ -252,10 +271,19 @@ public Cost visitPhysicalHashJoin( leftRowCount + rightRowCount, penalty); } + + if (context.isBroadcastJoin()) { + double broadcastJoinPenalty = broadCastJoinBalancePenalty(probeStats, buildStats); + return CostV1.of(leftRowCount * broadcastJoinPenalty + rightRowCount + outputRowCount, Review Comment: I think we would better to set up cost system on more dimension, for distinguishing the bc and shuffle, for example, we would consider exchange data cost, parallelism info to compare these two, by simulating the real execution difference between bc and shuffle as close as possible. In comparison, the introduced penalty parameter is meaningless, such as BROADCAST_JOIN_SKEW_RATIO, and will easily to be broken under different scenario in the future. -- 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