I believe that "ALTER <scope> SET …” is parsed in Calcite’s base parser, even 
in when Drill has extended the parser. (Note that Drill never calls “new 
SqlSetOption”.) So you should fix this by fixing the base parser. Maybe you 
could represent “RESET” as a SqlSetOption whose value is null (not the NULL SQL 
literal).

Julian


On Jul 27, 2015, at 6:50 PM, Sudheesh Katkam <[email protected]> wrote:

> Hello developers,
> 
> To support these statements as part of Apache Drill's SQL parser extension:
> 
> ALTER SESSION RESET `option name`
> ALTER SYSTEM RESET `option name`
> ALTER SESSION RESET ALL
> ALTER SYSTEM RESET ALL
> 
> I added the required implementation files, including changes to the config 
> file (keywords, statementParserMethods fields). However, I get a 
> ParseException because the parser resolves to SetSqlOption statement, which I 
> assume is due to a lookahead of 2. How do I go about resolving this?
> 
> Thank you,
> Sudheesh

Reply via email to