Source:
<code>public static synchronized CompiledPlan getCompiledPlanCalcite(SchemaPlus schemaPlus, SqlNode sqlNode) throws ValidationException, RelConversionException, PlannerFallbackException{ VoltPlanner planner = new VoltPlanner(schemaPlus); SqlNode validatedNode = planner.validate(sqlNode); RelNode rel = planner.convert(validatedNode); compileLog.info("ORIGINAL\n" + RelOptUtil.toString(rel)); RelTraitSet requiredLogicalOutputTraits = planner.getEmptyTraitSet().replace(VoltLogicalRel.CONVENTION); RelNode transformed = planner.transform( Phase.LOGICAL.ordinal(), requiredLogicalOutputTraits, rel); compileLog.info("LOGICAL\n" + RelOptUtil.toString(transformed)); planner.addRelTraitDef(RelDistributionTraitDef.INSTANCE); transformed = VoltRelUtil.addTraitRecurcively(transformed, RelDistributions.ANY); transformed = VoltPlanner.transformHep(Phase.MP_FALLBACK, transformed); RelTraitSet requiredPhysicalOutputTraits = transformed.getTraitSet() .replace(VoltPhysicalRel.CONVENTION) .replace(RelDistributions.ANY); transformed = planner.transform(Phase.PHYSICAL_CONVERSION.ordinal(), requiredPhysicalOutputTraits, transformed); <START> transformed = VoltPlanner.transformHep(Phase.INLINE, <END> HepMatchOrder.ARBITRARY, transformed, true); CompiledPlan compiledPlan = new CompiledPlan(false); calciteToVoltDBPlan((VoltPhysicalRel) transformed, compiledPlan); compiledPlan.explainedPlan = compiledPlan.rootPlanGraph.toExplainPlanString(); compiledPlan.resetPlanNodeIds(1); return compiledPlan; }</code><technical_language>a question. Is a dump result of planning stage in DEBUG mode debugoutput directory? I helpful specially in cases a final result is expect</technical_language>

Target:
public static synchronized CompiledPlan getCompiledPlanCalcite(SchemaPlus schemaPlus, SqlNode sqlNode) throws ValidationException, RelConversionException, PlannerFallbackException{ VoltPlanner planner = new VoltPlanner(schemaPlus); SqlNode validatedNode = planner.validate(sqlNode); RelNode rel = planner.convert(validatedNode); compileLog.info("ORIGINAL\n" + RelOptUtil.toString(rel)); RelTraitSet requiredLogicalOutputTraits = planner.getEmptyTraitSet().replace(VoltLogicalRel.CONVENTION); RelNode transformed = planner.transform( Phase.LOGICAL.ordinal(), requiredLogicalOutputTraits, rel); compileLog.info("LOGICAL\n" + RelOptUtil.toString(transformed)); planner.addRelTraitDef(RelDistributionTraitDef.INSTANCE); transformed = VoltRelUtil.addTraitRecursively(transformed, RelDistributions.ANY); transformed = VoltPlanner.transformHep(Phase.MP_FALLBACK, transformed); RelTraitSet requiredPhysicalOutputTraits = transformed.getTraitSet() .replace(VoltPhysicalRel.CONVENTION) .replace(RelDistributions.ANY); transformed = planner.transform(Phase.PHYSICAL_CONVERSION.ordinal(), requiredPhysicalOutputTraits, transformed); transformed = VoltPlanner.transformHep(Phase.INLINE, HepMatchOrder.ARBITRARY, transformed, true); CompiledPlan compiledPlan = new CompiledPlan(false); try { calciteToVoltDBPlan((VoltPhysicalRel) transformed, compiledPlan); compiledPlan.explainedPlan = compiledPlan.rootPlanGraph.toExplainPlanString(); compiledPlan.resetPlanNodeIds(1); } catch (Exception e){ throw new PlannerFallbackException(e.getMessage()); } planner.close(); fragmentizePlan(compiledPlan); return compiledPlan; }