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
Btw, the code is at https://github.com/tnachen/incubator-drill/tree/limit_op

Tim
On Sun, Sep 29, 2013 at 3:22 PM, Timothy Chen <[EMAIL PROTECTED]> wrote:

> I tried that as well earlier, but still the same result.
>
> It's creating the input and sorts, but in the end it won't call the
> DrillImplementor for Rels at all.
>
> I also tried taking out the replace, but same results too.
>
> It wonder if the best route (cheapest) as able to skip the one copied?
>
> I believe I followed mostly what you suggested that is follow
> EnumerableLimitRel impl.
>
> Tim
>
>
>
>
> On Sun, Sep 29, 2013 at 3:01 PM, Julian Hyde <[EMAIL PROTECTED]>wrote:
>
>>
>> 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
>>
>>
>