On Sep 28, 2013, at 1:01 AM, Timothy Chen <[email protected]> wrote:
> Here is one of the trials I tried:
>
> - final RelTraitSet traits = sort.getTraitSet().plus(DrillRel.CONVENTION);
> + final RelTraitSet traits = sort.getTraitSet();
> RelNode input = sort.getChild();
> if (!sort.getCollation().getFieldCollations().isEmpty()) {
> input = sort.copy(
> - sort.getTraitSet().replace(RelCollationImpl.EMPTY),
> - input,
> - RelCollationImpl.EMPTY,
> + sort.getTraitSet(),
> + sort,
> + sort.getCollation(),
> null,
> null);
> }
The
+ sort,
line should be
+ input,
otherwise you are creating a sort on top of a sort. Give that a try.
Julian