You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "xzj7019 (via GitHub)" <gi...@apache.org> on 2023/06/16 06:24:49 UTC

[GitHub] [doris] xzj7019 commented on a diff in pull request #20713: [tpcds](nereids)adjust cost model for BroadCastJoin and PartitionJoin

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-unsubscribe@doris.apache.org

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


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