calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <julianh...@gmail.com>
Subject Re: Adding new drill functions to optiq syntax
Date Mon, 22 Sep 2014 15:53:35 GMT
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
View raw message