public static PhysProj create(final RelNode input,
final List<RexNode> projects, RelDataType rowType) {
final RelOptCluster cluster = input.getCluster();
final RelMetadataQuery mq = RelMetadataQuery.instance();
final RelTraitSet traitSet =
cluster.traitSet().replace(PHYSICAL)
.replaceIfs(
RelCollationTraitDef.INSTANCE,
new Supplier<List<RelCollation>>() {
public List<RelCollation> get() {
return RelMdCollation.project(mq, input, projects);
}
});
return new PhysProj(cluster, traitSet, input, projects, rowType);
}
|