englefly commented on code in PR #20642: URL: https://github.com/apache/doris/pull/20642#discussion_r1226270669
########## fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java: ########## @@ -161,27 +161,27 @@ public Cost visitPhysicalPartitionTopN(PhysicalPartitionTopN<? extends Plan> par @Override public Cost visitPhysicalDistribute( PhysicalDistribute<? extends Plan> distribute, PlanContext context) { + int kBytes = 1024; Statistics childStatistics = context.getChildStatistics(0); DistributionSpec spec = distribute.getDistributionSpec(); + int beNumber = ConnectContext.get().getEnv().getClusterInfo().getBackendsNumber(true); + beNumber = Math.max(1, beNumber); + double dataSize = childStatistics.computeSize() / kBytes; // in K bytes // shuffle if (spec instanceof DistributionSpecHash) { return CostV1.of( 0, 0, - childStatistics.getRowCount()); Review Comment: ok, let's do it in next pr -- 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