calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yash Sharma <yash...@gmail.com>
Subject Re: Adding new drill functions to optiq syntax
Date Mon, 22 Sep 2014 18:07:19 GMT
Am debugging Optiqand DrillOperatorTable.

Strangely this works with backticks - as pointed out by Kryatal in
DRILL-1441
select `covar_pop`(employee_id, employee_id) FROM cp.`employee.json` limit
10;

On Mon, Sep 22, 2014 at 9:36 PM, Jacques Nadeau <jacques@apache.org> wrote:

> Agreed on all points.
>
> On Mon, Sep 22, 2014 at 8:53 AM, Julian Hyde <julianhyde@gmail.com> wrote:
>
> > If these functions don’t require new syntax — and it looks as if
> > regr_avgx, for one, is just simple function syntax — then you don’t need
> to
> > change the parser. If the parser needs semantic knowledge, such as
> whether
> > regr_avgx is a regular function or an aggregate function, you may be able
> > to pass that in via the SqlOperatorTable.
> >
> > In short, very unlikely you need to parser.
> >
> > Lastly, if you are adding SQL standard functionality to the parser or
> > validator, please consider contributing them to Optiq rather than
> handling
> > them in Drill-specific code.
> >
> > Julian
> >
> >
> > On Sep 22, 2014, at 5:50 AM, Yash Sharma <yash360@gmail.com> wrote:
> >
> > > Hi All,
> > > I am planning to add new drill functions to optiq syntax for parsing.
> > > We have new functions like regr_avgx/regr_avgy etc and existing ones
> like
> > > covar_samp,covar_pop, correlation/corr etc.
> > >
> > > Going through this old thread[1] I see that we need to add the
> > definitions
> > > in the CombinedParser.jj[2] in Optiq.
> > >
> > > Is that the way we still use or its handled differently now ?
> > >
> > > Thanks.
> > >
> > > 1: https://groups.google.com/forum/#!topic/optiq-dev/dkkxsHh2MnE
> > > 2.
> > >
> >
> https://github.com/yssharma/optiq/blob/retired/core/src/main/codegen/templates/CombinedParser.jj
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message