protected abstract static class SubstitutionVisitor.MutableRel extends Object
RelNode
.
Each node has mutable state, and keeps track of its parent and position
within parent.
It doesn't make sense to canonize MutableRels
,
otherwise one node could end up with multiple parents.
It follows that #hashCode
and #equals
are less efficient
than their RelNode
counterparts.
But, you don't need to copy a MutableRel
in order to change it.
For this reason, you should use MutableRel
for short-lived
operations, and transcribe back to RelNode
when you are done.
Modifier and Type | Field and Description |
---|---|
org.apache.calcite.plan.RelOptCluster |
cluster |
Modifier and Type | Method and Description |
---|---|
abstract void |
childrenAccept(org.apache.hadoop.hive.ql.optimizer.calcite.rules.views.SubstitutionVisitor.MutableRelVisitor visitor) |
String |
deep() |
abstract StringBuilder |
digest(StringBuilder buf) |
abstract List<SubstitutionVisitor.MutableRel> |
getInputs() |
SubstitutionVisitor.MutableRel |
getParent() |
org.apache.calcite.rel.type.RelDataType |
getRowType() |
SubstitutionVisitor.MutableRel |
replaceInParent(SubstitutionVisitor.MutableRel child)
Replaces this
MutableRel in its parent with another node at the
same position. |
abstract void |
setInput(int ordinalInParent,
SubstitutionVisitor.MutableRel input) |
String |
toString() |
public org.apache.calcite.rel.type.RelDataType getRowType()
public abstract void setInput(int ordinalInParent, SubstitutionVisitor.MutableRel input)
public abstract List<SubstitutionVisitor.MutableRel> getInputs()
public abstract void childrenAccept(org.apache.hadoop.hive.ql.optimizer.calcite.rules.views.SubstitutionVisitor.MutableRelVisitor visitor)
public SubstitutionVisitor.MutableRel replaceInParent(SubstitutionVisitor.MutableRel child)
MutableRel
in its parent with another node at the
same position.
Before the method, child
must be an orphan (have null parent)
and after this method, this MutableRel
is an orphan.
public abstract StringBuilder digest(StringBuilder buf)
public final String deep()
public SubstitutionVisitor.MutableRel getParent()
Copyright © 2021 The Apache Software Foundation. All rights reserved.