morrySnow commented on code in PR #39999: URL: https://github.com/apache/doris/pull/39999#discussion_r1734246521
########## fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java: ########## @@ -1978,6 +1960,27 @@ protected void computeFragmentHosts() throws Exception { } } + private int findMaxParallelFragmentIndex(PlanFragment fragment) { + Preconditions.checkState(!fragment.getChildren().isEmpty(), "fragment has no children"); Review Comment: print fragment id in error msg? ########## fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java: ########## @@ -1978,6 +1960,27 @@ protected void computeFragmentHosts() throws Exception { } } + private int findMaxParallelFragmentIndex(PlanFragment fragment) { + Preconditions.checkState(!fragment.getChildren().isEmpty(), "fragment has no children"); + + // exclude broadcast join right side's child fragments + List<PlanFragment> childFragmentCandidates = fragment.getChildren().stream() + .filter(e -> e.getOutputPartition() != DataPartition.UNPARTITIONED) + .collect(Collectors.toList()); Review Comment: for sort and limit, the fragment will have one child and its output partition is UNPARTITIONED. so we should check `childFragmentCandidates.isEmpty()` here to avoid return 0 -- 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