Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Dec 5, 2023
1 parent 34c85c9 commit 90273d1
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@ private void buildFragmentPlans() {
}
sb.append("\n[Fragment: ").append(fragment.getFragmentSequenceNum()).append("]");
sb.append("\n").append(sink.getExplainString("", TExplainLevel.BRIEF));
sinkNode = new PlanTreeNode(
sink instanceof MultiCastDataSink ? ((MultiCastDataSink) sink).getDataStreamSinks().stream()
.map(s -> s.getExchNodeId()).collect(Collectors.toList())
: ImmutableList.of(sink.getExchNodeId()), sb.toString());
List<PlanNodeId> exchangeIds;
if (sink instanceof MultiCastDataSink) {
exchangeIds = ((MultiCastDataSink) sink).getDataStreamSinks().stream()
.map(s -> s.getExchNodeId()).collect(Collectors.toList());
} else if (sink.getExchNodeId() != null) {
exchangeIds = ImmutableList.of(sink.getExchNodeId());
} else {
exchangeIds = ImmutableList.of();
}
sinkNode = new PlanTreeNode(exchangeIds, sb.toString());
if (i == 0) {
// sink of first fragment, set it as tree root
treeRoot = sinkNode;
Expand Down

0 comments on commit 90273d1

Please sign in to comment.