Class RelJsonWriter
java.lang.Object
org.apache.calcite.rel.externalize.RelJsonWriter
- All Implemented Interfaces:
RelWriter
Callback for a relational expression to dump itself as JSON.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a RelJsonWriter with a private JsonBuilder.RelJsonWriter
(JsonBuilder jsonBuilder) Creates a RelJsonWriter with a given JsonBuilder.RelJsonWriter
(JsonBuilder jsonBuilder, UnaryOperator<RelJson> relJsonTransform) Creates a RelJsonWriter. -
Method Summary
Modifier and TypeMethodDescriptionasString()
Returns a JSON string describing the relational expressions that were just explained.Writes the completed explanation.final void
Prints an explanation of a node, with a list of (term, value) pairs.protected void
Returns detail level at which plan should be generated.Adds an attribute to the explanation of the current node.boolean
nest()
Returns whether the writer prefers nested values.
-
Field Details
-
jsonBuilder
-
relJson
-
relList
-
-
Constructor Details
-
RelJsonWriter
public RelJsonWriter()Creates a RelJsonWriter with a private JsonBuilder. -
RelJsonWriter
Creates a RelJsonWriter with a given JsonBuilder. -
RelJsonWriter
Creates a RelJsonWriter.
-
-
Method Details
-
explain_
-
explain
Description copied from interface:RelWriter
Prints 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 ofRelNode
callsRelWriter.input(String, org.apache.calcite.rel.RelNode)
andRelWriter.item(String, Object)
to declare term-value pairs. -
getDetailLevel
Description copied from interface:RelWriter
Returns detail level at which plan should be generated.- Specified by:
getDetailLevel
in interfaceRelWriter
-
item
Description copied from interface:RelWriter
Adds an attribute to the explanation of the current node. -
done
Description copied from interface:RelWriter
Writes the completed explanation. -
nest
public boolean nest()Description copied from interface:RelWriter
Returns whether the writer prefers nested values. Traditional explain writers prefer flattened values. -
asString
Returns a JSON string describing the relational expressions that were just explained.
-