Class RelWriterImpl
java.lang.Object
org.apache.calcite.rel.externalize.RelWriterImpl
- All Implemented Interfaces:
RelWriter
- Direct Known Subclasses:
RelDotWriter,RelXmlWriter
Implementation of
RelWriter.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SqlExplainLevelprotected final booleanprotected final PrintWriterprotected final org.apache.calcite.avatica.util.Spacerprotected final boolean -
Constructor Summary
ConstructorsConstructorDescriptionRelWriterImpl(PrintWriter pw, SqlExplainLevel detailLevel, boolean withIdPrefix) RelWriterImpl(PrintWriter pw, SqlExplainLevel detailLevel, boolean withIdPrefix, boolean expand) -
Method Summary
Modifier and TypeMethodDescriptionWrites the completed explanation.booleanexpand()Returns whether the writer needs to expand node's detail information when printing plan.final voidPrints an explanation of a node, with a list of (term, value) pairs.protected voidReturns detail level at which plan should be generated.Adds an attribute to the explanation of the current node.simple()Converts the collected terms and values to a string.
-
Field Details
-
pw
-
detailLevel
-
withIdPrefix
protected final boolean withIdPrefix -
expand
protected final boolean expand -
spacer
protected final org.apache.calcite.avatica.util.Spacer spacer
-
-
Constructor Details
-
RelWriterImpl
-
RelWriterImpl
-
RelWriterImpl
public RelWriterImpl(PrintWriter pw, SqlExplainLevel detailLevel, boolean withIdPrefix, boolean expand)
-
-
Method Details
-
explain_
-
explain
Description copied from interface:RelWriterPrints an explanation of a node, with a list of (term, value) pairs.The term-value pairs are generally gathered by calling
RelNode.explain(RelWriter). Each sub-class ofRelNodecallsRelWriter.input(String, org.apache.calcite.rel.RelNode)andRelWriter.item(String, Object)to declare term-value pairs. -
getDetailLevel
Description copied from interface:RelWriterReturns detail level at which plan should be generated.- Specified by:
getDetailLevelin interfaceRelWriter
-
item
Description copied from interface:RelWriterAdds an attribute to the explanation of the current node. -
done
Description copied from interface:RelWriterWrites the completed explanation. -
simple
Converts the collected terms and values to a string. Does not write to the parent writer. -
expand
public boolean expand()Description copied from interface:RelWriterReturns whether the writer needs to expand node's detail information when printing plan. For example, LogicalSort(sort0=[$0], dir0=[ASC]) will be expanded to LogicalSort(sort0=[$0], dir0=[ASC-nulls-last]).
-