This is an automated email from the ASF dual-hosted git repository.

lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 583001bd92 [Bug](share hash table) Support shared hash table on 
Nereids (#16474)
583001bd92 is described below

commit 583001bd92422111a66e6beed21db5aa8e87f720
Author: Gabriel <[email protected]>
AuthorDate: Wed Feb 8 11:51:27 2023 +0800

    [Bug](share hash table) Support shared hash table on Nereids (#16474)
---
 .../glue/translator/PhysicalPlanTranslator.java    |  1 +
 .../main/java/org/apache/doris/qe/Coordinator.java | 25 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java
index b7eebd4562..a72bba6b58 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java
@@ -1595,6 +1595,7 @@ public class PhysicalPlanTranslator extends 
DefaultPlanVisitor<PlanFragment, Pla
             PlanFragment rightFragment, PlanTranslatorContext context) {
         hashJoinNode.setDistributionMode(DistributionMode.BROADCAST);
         leftFragment.setPlanRoot(hashJoinNode);
+        rightFragment.setRightChildOfBroadcastHashJoin(true);
         connectChildFragment(hashJoinNode, 1, leftFragment, rightFragment, 
context);
         return leftFragment;
     }
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 e90b38df4e..98aeb7a6fe 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
@@ -1132,20 +1132,19 @@ public class Coordinator {
                     destParams.instanceExecParams.forEach(param -> {
                         if (destHosts.containsKey(param.host)) {
                             
destHosts.get(param.host).instancesSharingHashTable.add(param.instanceId);
-                            return;
-                        }
-                        destHosts.put(param.host, param);
-
-                        param.buildHashTableForBroadcastJoin = true;
-                        TPlanFragmentDestination dest = new 
TPlanFragmentDestination();
-                        dest.fragment_instance_id = param.instanceId;
-                        try {
-                            dest.server = toRpcHost(param.host);
-                            dest.setBrpcServer(toBrpcHost(param.host));
-                        } catch (Exception e) {
-                            throw new RuntimeException(e);
+                        } else {
+                            destHosts.put(param.host, param);
+                            param.buildHashTableForBroadcastJoin = true;
+                            TPlanFragmentDestination dest = new 
TPlanFragmentDestination();
+                            dest.fragment_instance_id = param.instanceId;
+                            try {
+                                dest.server = toRpcHost(param.host);
+                                dest.setBrpcServer(toBrpcHost(param.host));
+                            } catch (Exception e) {
+                                throw new RuntimeException(e);
+                            }
+                            params.destinations.add(dest);
                         }
-                        params.destinations.add(dest);
                     });
                 } else {
                     // add destination host to this fragment's destination


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to