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

morrysnow 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 65f71d9e06 [enhance](nereids) broadcast cost calculate (#17711)
65f71d9e06 is described below

commit 65f71d9e06154680961940f225f060a90ad7b69f
Author: minghong <engle...@gmail.com>
AuthorDate: Tue Mar 14 19:45:03 2023 +0800

    [enhance](nereids) broadcast cost calculate (#17711)
    
    update broadcast join cost estimate according to BE implementation.
    there is an enhancement on BE. in broadcast join, BE only build one hash 
table, not instanceNum hash tables.
---
 .../main/java/org/apache/doris/nereids/cost/CostModelV1.java | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java
index c04807d7c3..e415543bfa 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java
@@ -170,10 +170,16 @@ class CostModelV1 extends PlanVisitor<Cost, PlanContext> {
                     || childStatistics.getRowCount() > rowsLimit) {
                 return CostV1.of(Double.MAX_VALUE, Double.MAX_VALUE, 
Double.MAX_VALUE);
             }
+            /*
+            TODO:
+            srcBeNum and destBeNum are not available, assume 
destBeNum/srcBeNum = 1
+            1. cpu: row * destBeNum/srcBeNum
+            2. network: rows send = rows/srcBeNum * destBeNum.
+             */
             return CostV1.of(
-                    childStatistics.getRowCount() * beNumber,
-                    childStatistics.getRowCount() * beNumber * instanceNumber,
-                    childStatistics.getRowCount() * beNumber * instanceNumber);
+                    childStatistics.getRowCount(), // TODO:should multiply by 
destBeNum/srcBeNum
+                    childStatistics.getRowCount(), // only consider one BE, 
not the whole system.
+                    childStatistics.getRowCount() * instanceNumber); // TODO: 
remove instanceNumber when BE updated
         }
 
         // gather


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

Reply via email to