From 7e13881b4c0b8bfdab3f0bd12e592bb91afba7a7 Mon Sep 17 00:00:00 2001 From: 924060929 Date: Thu, 28 Nov 2024 20:52:27 +0800 Subject: [PATCH] opt --- .../plans/distribute/worker/job/UnassignedShuffleJob.java | 5 ----- .../src/main/java/org/apache/doris/qe/Coordinator.java | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/UnassignedShuffleJob.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/UnassignedShuffleJob.java index 3d937bfb35dbf9f..ebad6ffdefff1c4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/UnassignedShuffleJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/UnassignedShuffleJob.java @@ -90,11 +90,6 @@ protected int degreeOfParallelism() { } // TODO: check nested loop join do right outer / semi / anti join - PlanNode leftMostNode = findLeftmostNode(fragment.getPlanRoot()).second; - // when we use nested loop join do right outer / semi / anti join, the instance must be 1. - if (leftMostNode.getNumInstances() == 1) { - expectInstanceNum = 1; - } return expectInstanceNum; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java index 262b5836689ab0b..ef05716f66685f4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java @@ -1815,8 +1815,9 @@ protected void computeFragmentHosts() throws Exception { if (ConnectContext.get() != null && ConnectContext.get().getSessionVariable() != null) { exchangeInstances = ConnectContext.get().getSessionVariable().getExchangeInstanceParallel(); } + boolean isNereids = context != null && context.getState().isNereids(); // when we use nested loop join do right outer / semi / anti join, the instance must be 1. - if (leftMostNode.getNumInstances() == 1) { + if (!isNereids && leftMostNode.getNumInstances() == 1) { exchangeInstances = 1; } // Using serial source means a serial source operator will be used in this fragment (e.g. data will be