You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/02 03:20:36 UTC

[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #8695: [enhancement] update broadcast join cost algorithm

EmmyMiao87 commented on a change in pull request #8695:
URL: https://github.com/apache/incubator-doris/pull/8695#discussion_r841000284



##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
##########
@@ -60,9 +60,18 @@
     private final static Logger LOG = LogManager.getLogger(DistributedPlanner.class);
 
     private final PlannerContext ctx_;
+    private final long autoBroadcastJoinThreshold;
 
     public DistributedPlanner(PlannerContext ctx) {
         ctx_ = ctx;
+        long perNodeMemLimit = ctx_.getQueryOptions().mem_limit;

Review comment:
       It seems to be more cohesive to put the logic function that calculates autoBroadcastJoinThreshold in 'createHashJoinFragment'.

##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
##########
@@ -60,9 +60,18 @@
     private final static Logger LOG = LogManager.getLogger(DistributedPlanner.class);
 
     private final PlannerContext ctx_;
+    private final long autoBroadcastJoinThreshold;

Review comment:
       Local variables within functions are better than member variables.

##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
##########
@@ -181,8 +188,7 @@ PlanFragment createInsertFragment(
      * partitioned; the partition function is derived from the inputs.
      */
     private PlanFragment createPlanFragments(
-            PlanNode root, boolean isPartitioned,
-            long perNodeMemLimit, ArrayList<PlanFragment> fragments) throws UserException {
+            PlanNode root, boolean isPartitioned, ArrayList<PlanFragment> fragments) throws UserException {

Review comment:
       That indeed what I mean ~
   




-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org