Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill >> mail # dev >> Re: Review Request 14027: Adding Limit operator end to end


Copy link to this message
-
Re: Review Request 14027: Adding Limit operator end to end

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