Package org.apache.calcite.rel.logical
Class LogicalSort
java.lang.Object
org.apache.calcite.rel.AbstractRelNode
org.apache.calcite.rel.SingleRel
org.apache.calcite.rel.core.Sort
org.apache.calcite.rel.logical.LogicalSort
- All Implemented Interfaces:
Cloneable
,RelOptNode
,Hintable
,RelNode
Sub-class of
Sort
not
targeted at any particular engine or calling convention.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
Field Summary
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
Constructor Summary
ConstructorDescriptionLogicalSort
(RelInput input) Creates a LogicalSort by parsing serialized output. -
Method Summary
Modifier and TypeMethodDescriptionaccept
(RelShuttle shuttle) Accepts a visit from a shuttle.copy
(RelTraitSet traitSet, RelNode newInput, RelCollation newCollation, @Nullable RexNode offset, @Nullable RexNode fetch) static LogicalSort
create
(RelNode input, RelCollation collation, @Nullable RexNode offset, @Nullable RexNode fetch) Creates a LogicalSort.Returns a new relational expression with the specified hintshintList
.Methods inherited from class org.apache.calcite.rel.core.Sort
accept, computeSelfCost, copy, copy, explainTerms, getCollation, getHints, getSortExps, isEnforcer
Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInput
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
collectVariablesSet, collectVariablesUsed, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.calcite.rel.hint.Hintable
attachHints
Methods inherited from interface org.apache.calcite.rel.RelNode
explain, fieldIsNullable, stripped
-
Constructor Details
-
LogicalSort
Creates a LogicalSort by parsing serialized output.
-
-
Method Details
-
create
public static LogicalSort create(RelNode input, RelCollation collation, @Nullable RexNode offset, @Nullable RexNode fetch) Creates a LogicalSort.- Parameters:
input
- Input relational expressioncollation
- array of sort specificationsoffset
- Expression for number of rows to discard before returning first rowfetch
- Expression for number of rows to fetch
-
copy
public Sort copy(RelTraitSet traitSet, RelNode newInput, RelCollation newCollation, @Nullable RexNode offset, @Nullable RexNode fetch) -
accept
Description copied from interface:RelNode
Accepts a visit from a shuttle.- Specified by:
accept
in interfaceRelNode
- Overrides:
accept
in classAbstractRelNode
- Parameters:
shuttle
- Shuttle- Returns:
- A copy of this node incorporating changes made by the shuttle to this node's children
-
withHints
Description copied from interface:Hintable
Returns a new relational expression with the specified hintshintList
.This method should be overridden by every logical node that supports hint. It is only for internal use during decorrelation.
Sub-class should return a new copy of the relational expression.
The default implementation returns the relational expression directly only because not every kind of relational expression supports hints.
- Returns:
- Relational expression with set up hints
-