Class LogicalSort

All Implemented Interfaces:
Cloneable, RelOptNode, Hintable, RelNode

public final class LogicalSort extends Sort
Sub-class of Sort not targeted at any particular engine or calling convention.
  • Constructor Details

    • LogicalSort

      public LogicalSort(RelInput input)
      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 expression
      collation - array of sort specifications
      offset - Expression for number of rows to discard before returning first row
      fetch - Expression for number of rows to fetch
    • copy

      public Sort copy(RelTraitSet traitSet, RelNode newInput, RelCollation newCollation, @Nullable RexNode offset, @Nullable RexNode fetch)
      Specified by:
      copy in class Sort
    • accept

      public RelNode accept(RelShuttle shuttle)
      Description copied from interface: RelNode
      Accepts a visit from a shuttle.
      Specified by:
      accept in interface RelNode
      Overrides:
      accept in class AbstractRelNode
      Parameters:
      shuttle - Shuttle
      Returns:
      A copy of this node incorporating changes made by the shuttle to this node's children
    • withHints

      public RelNode withHints(List<RelHint> hintList)
      Description copied from interface: Hintable
      Returns a new relational expression with the specified hints hintList.

      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