Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Nov 6, 2023
1 parent 94639b2 commit 6c47487
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,27 +291,12 @@ public Cost visitPhysicalHashJoin(
// use totalInstanceNumber to the power of 2 as the default factor value
buildSideFactor = Math.pow(totalInstanceNumber, 0.5);
}
// TODO: since the outputs rows may expand a lot, penalty on it will cause bc never be chosen.
// will refine this in next generation cost model.
// if (!context.isStatsReliable()) {
// // forbid broadcast join when stats is unknown
// return CostV1.of(context.getSessionVariable(), rightRowCount * buildSideFactor + 1 / leftRowCount,
// rightRowCount,
// 0
// );
// }
return CostV1.of(context.getSessionVariable(),
leftRowCount + rightRowCount * buildSideFactor + outputRowCount * probeSideFactor,
rightRowCount,
0
);
}
// if (!context.isStatsReliable()) {
// return CostV1.of(context.getSessionVariable(),
// rightRowCount + 1 / leftRowCount,
// rightRowCount,
// 0);
// }
return CostV1.of(context.getSessionVariable(), leftRowCount + rightRowCount + outputRowCount,
rightRowCount,
0
Expand All @@ -326,12 +311,6 @@ public Cost visitPhysicalNestedLoopJoin(
Preconditions.checkState(context.arity() == 2);
Statistics leftStatistics = context.getChildStatistics(0);
Statistics rightStatistics = context.getChildStatistics(1);
// if (!context.isStatsReliable()) {
// return CostV1.of(context.getSessionVariable(),
// rightStatistics.getRowCount() + 1 / leftStatistics.getRowCount(),
// rightStatistics.getRowCount(),
// 0);
// }
return CostV1.of(context.getSessionVariable(),
leftStatistics.getRowCount() * rightStatistics.getRowCount(),
rightStatistics.getRowCount(),
Expand Down

0 comments on commit 6c47487

Please sign in to comment.