Package org.apache.calcite.materialize
Class MutableNode
- java.lang.Object
-
- org.apache.calcite.materialize.MutableNode
-
class MutableNode extends java.lang.Object
Mutable version ofLatticeNode
, used while a graph is being built.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
alias
(package private) java.util.List<MutableNode>
children
(package private) int
endCol
(package private) static com.google.common.collect.Ordering<MutableNode>
ORDERING
Comparator for sorting children within a parent.(package private) MutableNode
parent
(package private) int
startCol
(package private) Step
step
(package private) LatticeTable
table
-
Constructor Summary
Constructors Constructor Description MutableNode(LatticeTable table)
Creates a root node.MutableNode(LatticeTable table, MutableNode parent, Step step)
Creates a non-root node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addPath(Path path, java.lang.String alias)
private MutableNode
findChild(Step step)
(package private) void
flatten(java.util.List<MutableNode> flatNodes)
Populates a flattened list of mutable nodes.(package private) boolean
isCyclic()
Returns whether this node is cylic, in an undirected sense; that is, whether the same descendant can be reached by more than one route.private boolean
isCyclicRecurse(java.util.Set<MutableNode> descendants)
-
-
-
Field Detail
-
table
final LatticeTable table
-
parent
final MutableNode parent
-
step
final Step step
-
startCol
int startCol
-
endCol
int endCol
-
alias
java.lang.String alias
-
children
final java.util.List<MutableNode> children
-
ORDERING
static final com.google.common.collect.Ordering<MutableNode> ORDERING
Comparator for sorting children within a parent.
-
-
Constructor Detail
-
MutableNode
MutableNode(LatticeTable table)
Creates a root node.
-
MutableNode
MutableNode(LatticeTable table, MutableNode parent, Step step)
Creates a non-root node.
-
-
Method Detail
-
flatten
void flatten(java.util.List<MutableNode> flatNodes)
Populates a flattened list of mutable nodes.
-
isCyclic
boolean isCyclic()
Returns whether this node is cylic, in an undirected sense; that is, whether the same descendant can be reached by more than one route.
-
isCyclicRecurse
private boolean isCyclicRecurse(java.util.Set<MutableNode> descendants)
-
addPath
void addPath(Path path, java.lang.String alias)
-
findChild
private MutableNode findChild(Step step)
-
-