@Override public Sort copy(RelTraitSet traitSet, RelNode newInput, RelCollation newCollation, RexNode offset, RexNode fetch) { return new LogicalSort(getCluster(), traitSet, newInput, newCollation, offset, fetch); }
@Override public Sort copy(RelTraitSet traitSet, RelNode newInput, RelCollation newCollation, RexNode offset, RexNode fetch) { return new LogicalSort(getCluster(), traitSet, newInput, newCollation, offset, fetch); }
/** * Creates a LogicalSort. * * @param input Input relational expression * @param collation array of sort specifications * @param offset Expression for number of rows to discard before returning * first row * @param fetch Expression for number of rows to fetch */ public static LogicalSort create(RelNode input, RelCollation collation, RexNode offset, RexNode fetch) { RelOptCluster cluster = input.getCluster(); collation = RelCollationTraitDef.INSTANCE.canonize(collation); RelTraitSet traitSet = input.getTraitSet().replace(Convention.NONE).replace(collation); return new LogicalSort(cluster, traitSet, input, collation, offset, fetch); }
/** * Creates a LogicalSort. * * @param input Input relational expression * @param collation array of sort specifications * @param offset Expression for number of rows to discard before returning * first row * @param fetch Expression for number of rows to fetch */ public static LogicalSort create(RelNode input, RelCollation collation, RexNode offset, RexNode fetch) { RelOptCluster cluster = input.getCluster(); collation = RelCollationTraitDef.INSTANCE.canonize(collation); RelTraitSet traitSet = input.getTraitSet().replace(Convention.NONE).replace(collation); return new LogicalSort(cluster, traitSet, input, collation, offset, fetch); }
@Override public RelNode visit(LogicalSort sort) { final RelNode input = sort.getInput().accept(this); return new LogicalSort( cluster, copyOf(sort.getTraitSet()), input, sort.getCollation(), copyOf(sort.offset), copyOf(sort.fetch) ); }