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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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 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.booleannest()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: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. -
nest
public boolean nest()Description copied from interface:RelWriterReturns 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.
-