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 b0ff852d74 [opt](Nereids) right deep tree penalty adjust: use right 
rowCount, not abs(left - right) (#14239)
b0ff852d74 is described below

commit b0ff852d742ad108ae9fb68b8ed9f279f77980b1
Author: minghong <[email protected]>
AuthorDate: Mon Nov 14 16:40:26 2022 +0800

    [opt](Nereids) right deep tree penalty adjust: use right rowCount, not 
abs(left - right) (#14239)
    
    in origin algorithm, the penalty is abs(leftRowCount - RightRowCount). this 
will make some right deep tree escape from penalty, because the substraction is 
almost zero. Penalty by RightRowCount can avoid this escape.
---
 .../src/main/java/org/apache/doris/nereids/cost/CostCalculator.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostCalculator.java 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostCalculator.java
index 7f5412470c..a0ffd98703 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostCalculator.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostCalculator.java
@@ -218,7 +218,7 @@ public class CostCalculator {
                     * Math.min(probeStats.getPenalty(), 
buildStats.getPenalty());
             if (buildStats.getWidth() >= 2) {
                 //penalty for right deep tree
-                penalty += Math.abs(leftRowCount - rightRowCount);
+                penalty += rightRowCount;
             }
 
             if (physicalHashJoin.getJoinType().isCrossJoin()) {


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

Reply via email to