Skip to content

Commit

Permalink
[enhancement](Nereids): speedup graphsimplifier (apache#26066)
Browse files Browse the repository at this point in the history
1. fix some bugs in graphsimplifier
2. remove some time costed code
3. add shape check for graphsimplifier
  • Loading branch information
keanji-x authored Oct 30, 2023
1 parent 619f2bb commit b3f31f9
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 171 deletions.
10 changes: 0 additions & 10 deletions fe/fe-core/src/main/java/org/apache/doris/nereids/cost/Cost.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@
public interface Cost {
double getValue();

/**
* This is for calculating the cost in simplifier
*/
static Cost withRowCount(double rowCount) {
if (ConnectContext.get().getSessionVariable().getEnableNewCostModel()) {
return new CostV2(0, rowCount, 0);
}
return new CostV1(rowCount);
}

/**
* return zero cost
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ public CostV1(double cpuCost, double memoryCost, double networkCost) {
+ costWeight.networkWeight * networkCost;
}

public CostV1(double cost) {
this.cost = cost;
this.cpuCost = 0;
this.networkCost = 0;
this.memoryCost = 0;
}

public static CostV1 infinite() {
return INFINITE;
}
Expand Down
Loading

0 comments on commit b3f31f9

Please sign in to comment.