morrySnow commented on code in PR #27225: URL: https://github.com/apache/doris/pull/27225#discussion_r1407049800
########## fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java: ########## @@ -299,7 +303,29 @@ public Cost visitPhysicalHashJoin( 0 ); } - return CostV1.of(context.getSessionVariable(), leftRowCount + rightRowCount + outputRowCount, + double penaltyForShuffleSingleProbeBucket = 1.0; + for (Expression conj : physicalHashJoin.getHashJoinConjuncts()) { + EqualTo eq = (EqualTo) JoinUtils.swapEqualToForChildrenOrder( + (EqualTo) conj, physicalHashJoin.left().getOutputSet()); + ColumnStatistic leftColStats = probeStats.findColumnStatistics(eq.left()); + if (leftColStats != null) { + if (leftColStats.ndv < beNumber) { + penaltyForShuffleSingleProbeBucket = 10; Review Comment: why 10? -- 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