Skip to content

Commit bc8230e

Browse files
committed
[CALCITE-7422] Support large plan optimization mode for HepPlanner
Key optimizations of large plan mode: 1. Reusable graph, avoid reinit. 2. Efficient traversal, skip stable subtree. 3. Fine-grained GC. Usage: see comments of HepPlanner() Perf result of LargePlanBenchmark: - 10K unions (~40K nodes): ~8.8s - 100K unions (~400K nodes): ~60.6s Without this mode, such plans will OOM and take very long time(cannot finish).
1 parent 8a87360 commit bc8230e

File tree

4 files changed

+393
-63
lines changed

4 files changed

+393
-63
lines changed

core/src/main/java/org/apache/calcite/plan/AbstractRelOptPlanner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ protected void onNewClass(RelNode node) {
308308
// do nothing
309309
}
310310

311-
protected void dumpRuleAttemptsInfo() {
311+
public void dumpRuleAttemptsInfo() {
312312
if (this.ruleAttemptsListener != null) {
313313
RULE_ATTEMPTS_LOGGER.debug("Rule Attempts Info for " + this.getClass().getSimpleName());
314314
RULE_ATTEMPTS_LOGGER.debug(this.ruleAttemptsListener.dump());

0 commit comments

Comments
 (0)