org.eigenbase.rel
Class SortRel
java.lang.Object
org.eigenbase.rel.AbstractRelNode
org.eigenbase.rel.SingleRel
org.eigenbase.rel.SortRel
- All Implemented Interfaces:
- Cloneable, RelNode
public final class SortRel
- extends SingleRel
Relational expression which imposes a particular sort order on its input
without otherwise changing its content.
Methods inherited from class org.eigenbase.rel.AbstractRelNode |
cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRowType, getTable, getTraits, getVariablesStopped, inheritTraitsFrom, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString |
collations
protected final RelFieldCollation[] collations
fieldExps
protected final RexNode[] fieldExps
SortRel
public SortRel(RelOptCluster cluster,
RelNode child,
RelFieldCollation[] collations)
- Creates a sorter.
- Parameters:
cluster
- RelOptCluster
this relational expression belongs
tochild
- input relational expressioncollations
- array of sort specifications
clone
public SortRel clone()
- Description copied from interface:
RelNode
- Clones this RelNode.
Traits of the RelNode must be explicitly cloned, using AbstractRelNode.inheritTraitsFrom(AbstractRelNode)
, as the RelNode may
have traits of which it has no knowledge. Example implementation:
public MyRelNode clone()
{
MyRelNode clone = new MyRelNode(...);
clone.inheritTraitsFrom(this);
return clone;
}
N.B.: This method must be overridden whenever an existing,
concrete RelNode is extended. Otherwise, calling clone() will produce a
differently typed RelNode, resulting in invalid or incorrect query plans.
- Specified by:
clone
in interface RelNode
- Specified by:
clone
in class AbstractRelNode
- Returns:
- a clone of this RelNode
getChildExps
public RexNode[] getChildExps()
- Description copied from interface:
RelNode
- Returns an array of this relational expression's child expressions (not
including the inputs returned by
RelNode.getInputs()
. If there are no
child expressions, returns an empty array, not null
.
- Specified by:
getChildExps
in interface RelNode
- Overrides:
getChildExps
in class AbstractRelNode
getCollations
public RelFieldCollation[] getCollations()
- Returns:
- array of RelFieldCollations, from most significant to least
significant
explain
public void explain(RelOptPlanWriter pw)
- Specified by:
explain
in interface RelNode
- Overrides:
explain
in class SingleRel