It is used for generating EXPLAIN PLAN output, and also for serializing a tree of relational expressions to JSON.
42434445464748495051
public static String printWithIds(final Prel rel, SqlExplainLevel explainlevel){ if (rel == null) { return null; } final StringWriter sw = new StringWriter(); final RelWriter planWriter = new NumberingRelWriter(getIdMap(rel), new PrintWriter(sw), explainlevel); rel.explain(planWriter); return sw.toString(); }
40414243444546474849
public static String printWithIds(final Prel rel, SqlExplainLevel explainlevel) { if (rel == null) { return null; } final StringWriter sw = new StringWriter(); final RelWriter planWriter = new NumberingRelWriter(getIdMap(rel), new PrintWriter(sw), explainlevel); rel.explain(planWriter); return sw.toString(); }