public interface RelWriter
It is used for generating EXPLAIN PLAN output, and also for serializing a tree of relational expressions to JSON.
Modifier and Type | Method and Description |
---|---|
RelWriter |
done(RelNode node)
Writes the completed explanation.
|
void |
explain(RelNode rel,
java.util.List<Pair<java.lang.String,java.lang.Object>> valueList)
Prints an explanation of a node, with a list of (term, value) pairs.
|
SqlExplainLevel |
getDetailLevel() |
default RelWriter |
input(java.lang.String term,
RelNode input)
Adds an input to the explanation of the current node.
|
RelWriter |
item(java.lang.String term,
java.lang.Object value)
Adds an attribute to the explanation of the current node.
|
default RelWriter |
itemIf(java.lang.String term,
java.lang.Object value,
boolean condition)
Adds an input to the explanation of the current node, if a condition
holds.
|
default boolean |
nest()
Returns whether the writer prefers nested values.
|
void explain(RelNode rel, java.util.List<Pair<java.lang.String,java.lang.Object>> valueList)
The term-value pairs are generally gathered by calling
RelNode.explain(RelWriter)
.
Each sub-class of RelNode
calls input(String, org.apache.calcite.rel.RelNode)
and item(String, Object)
to declare term-value pairs.
rel
- Relational expressionvalueList
- List of term-value pairsSqlExplainLevel getDetailLevel()
default RelWriter input(java.lang.String term, RelNode input)
term
- Term for input, e.g. "left" or "input #1".input
- Input relational expressionRelWriter item(java.lang.String term, java.lang.Object value)
term
- Term for attribute, e.g. "joinType"value
- Attribute valuedefault RelWriter itemIf(java.lang.String term, java.lang.Object value, boolean condition)
default boolean nest()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.