Hi Yash, What is the JavaCC error you are seeing? If you are adding "COVAR_POP" which already exists in the keywords list in Optiq's CombinedParser.jj. "keywords" variable in Parser.tdd is used if you want to add new keywords that don't exists in Optiq's keyword list (ex. "USE", "FILES", "DATABASES" etc.)
You don't need to write corresponding methods unless you want to add new SQL constructs that use the new keyword. Thanks Venki On Tue, Sep 23, 2014 at 8:35 AM, Yash Sharma <[email protected]> wrote: > Thanks lot Venki. Infact I reached this point and tried adding new keyword > here but I couldn't build drill. > It kept failing with JavaCC error. > I also had a look at parserImpls.ftl but couldnot decode it. > > Do we also have to write the methods for the corresponding keywords? > > Thanks > On 23/09/2014 8:25 pm, "Venki Korukanti" <[email protected]> > wrote: > > > Yash: Here > > < > > > https://github.com/apache/incubator-drill/blob/master/exec/java-exec/src/main/codegen/data/Parser.tdd#L30 > > > > > is > > the link to the freemarker data file for parser. You can add new keywords > > to "keywords" section. > > > > On Tue, Sep 23, 2014 at 3:17 AM, Yash Sharma <[email protected]> wrote: > > > > > @Jacques- I would wait for Venki's input. Till then I have created a > > patch > > > for Optiq. > > > > > > @Julian/Optiq Dev: Could you please review the commit[1] if everything > > > looks good. Also I am not able to run the test case. > > > I am using: > > > $mvn test -Dtest=SqlOperatorBaseTest#testStddevPopFunc > > > It is not able to recognize the test cases. > > > Works fine with -DfailIfNoTests=flase flag. > > > > > > 1: > > > > > > > > > https://github.com/yssharma/incubator-optiq/commit/9a0b063adf91cee78f3d167c002eb07c6fb7b9b2 > > > > > > Thanks > > > > > > > > > > > > On Tue, Sep 23, 2014 at 9:27 AM, Jacques Nadeau <[email protected]> > > > wrote: > > > > > > > I believe that Drill also allows addition of reserved words through > > some > > > of > > > > the freemarker inclusions but could be mistaken. I think Venki could > > > > provide more input if you can't find the spot. > > > > > > > > On Mon, Sep 22, 2014 at 12:28 PM, Julian Hyde <[email protected] > > > > > > wrote: > > > > > > > > > On Sep 22, 2014, at 11:07 AM, Yash Sharma <[email protected]> > wrote: > > > > > > > > > > > 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; > > > > > > > > > > See my comments on REPLACE in > > > > > https://issues.apache.org/jira/browse/DRILL-1441. The problems > > relate > > > to > > > > > using a non-reserved keyword as an identifier. > > > > > > > > > > Regarding COVAR_POP. Probably something similar happening regarding > > > > > reserved words being. You should probably add it to > > > > ReservedFunctionName(), > > > > > just like VAR_POP and STDEV_POP. That is probably tricky to do in > > > Drill — > > > > > so I suggest you contribute an Optiq patch. Be sure to add tests to > > > > > SqlOperatorBaseTest along the lines of testVarPopFunc. > > > > > > > > > > Julian > > > > > > > > > > > > > > > > > > > >
