You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Enrico Olivelli <eo...@gmail.com> on 2017/11/17 13:43:48 UTC

Support for "limit ?"

Hi,
I see that Calcite does not support dynamic parameters in LIMIT clause.
Is it only a simple feature to be implemented or there is a deep reason ?
I see that limit offset and fetch are already represented with RexNode in
EnumerableLimit

If it is feasible can you give me some hint in order to create a patch ?

This fix will be very important because YCSB benchmarks use this syntax

Thanks
I hope to be ready to use Calcite soon in my project

Enrico

Re: Support for "limit ?"

Posted by Enrico Olivelli <eo...@gmail.com>.
I have a proble on JdbcTest, I can't find how to test dynamic parameters.
Can you give some hint ?
A part from this a will send my patch soon

Enrico

2017-11-17 19:41 GMT+01:00 Enrico Olivelli <eo...@gmail.com>:

>
>
> Il ven 17 nov 2017, 19:29 Julian Hyde <jh...@apache.org> ha scritto:
>
>> Parameters in the OFFSET and FETCH clauses are definitely a feature
>> we'd like. It's moderate effort. It's not been done just because we
>> don't have the resources.
>>
>> Can you please log a JIRA case.
>>
>> My best "hint" is how I'd approach the problem: I'd add test methods
>> to SqlParserTest, SqlValidatorTest, and JdbcTest with both negative
>> and positive tests. Then I'd make code changes until they pass. It
>> sounds flippant, but I literally don't know which code I would need to
>> change, but the tests (and a debugger) would help me figure it out.
>>
>
> Thank you I will do this way (that is the same I use every day)
> I will log a JIRA and try to send a patch
>
> Enrico
>
>>
>> Julian
>>
>>
>> On Fri, Nov 17, 2017 at 5:43 AM, Enrico Olivelli <eo...@gmail.com>
>> wrote:
>> > Hi,
>> > I see that Calcite does not support dynamic parameters in LIMIT clause.
>> > Is it only a simple feature to be implemented or there is a deep reason
>> ?
>> > I see that limit offset and fetch are already represented with RexNode
>> in
>> > EnumerableLimit
>> >
>> > If it is feasible can you give me some hint in order to create a patch ?
>> >
>> > This fix will be very important because YCSB benchmarks use this syntax
>> >
>> > Thanks
>> > I hope to be ready to use Calcite soon in my project
>> >
>> > Enrico
>>
> --
>
>
> -- Enrico Olivelli
>

Re: Support for "limit ?"

Posted by Enrico Olivelli <eo...@gmail.com>.
Il ven 17 nov 2017, 19:29 Julian Hyde <jh...@apache.org> ha scritto:

> Parameters in the OFFSET and FETCH clauses are definitely a feature
> we'd like. It's moderate effort. It's not been done just because we
> don't have the resources.
>
> Can you please log a JIRA case.
>
> My best "hint" is how I'd approach the problem: I'd add test methods
> to SqlParserTest, SqlValidatorTest, and JdbcTest with both negative
> and positive tests. Then I'd make code changes until they pass. It
> sounds flippant, but I literally don't know which code I would need to
> change, but the tests (and a debugger) would help me figure it out.
>

Thank you I will do this way (that is the same I use every day)
I will log a JIRA and try to send a patch

Enrico

>
> Julian
>
>
> On Fri, Nov 17, 2017 at 5:43 AM, Enrico Olivelli <eo...@gmail.com>
> wrote:
> > Hi,
> > I see that Calcite does not support dynamic parameters in LIMIT clause.
> > Is it only a simple feature to be implemented or there is a deep reason ?
> > I see that limit offset and fetch are already represented with RexNode in
> > EnumerableLimit
> >
> > If it is feasible can you give me some hint in order to create a patch ?
> >
> > This fix will be very important because YCSB benchmarks use this syntax
> >
> > Thanks
> > I hope to be ready to use Calcite soon in my project
> >
> > Enrico
>
-- 


-- Enrico Olivelli

Re: Support for "limit ?"

Posted by Julian Hyde <jh...@apache.org>.
Parameters in the OFFSET and FETCH clauses are definitely a feature
we'd like. It's moderate effort. It's not been done just because we
don't have the resources.

Can you please log a JIRA case.

My best "hint" is how I'd approach the problem: I'd add test methods
to SqlParserTest, SqlValidatorTest, and JdbcTest with both negative
and positive tests. Then I'd make code changes until they pass. It
sounds flippant, but I literally don't know which code I would need to
change, but the tests (and a debugger) would help me figure it out.

Julian


On Fri, Nov 17, 2017 at 5:43 AM, Enrico Olivelli <eo...@gmail.com> wrote:
> Hi,
> I see that Calcite does not support dynamic parameters in LIMIT clause.
> Is it only a simple feature to be implemented or there is a deep reason ?
> I see that limit offset and fetch are already represented with RexNode in
> EnumerableLimit
>
> If it is feasible can you give me some hint in order to create a patch ?
>
> This fix will be very important because YCSB benchmarks use this syntax
>
> Thanks
> I hope to be ready to use Calcite soon in my project
>
> Enrico