calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Altekruse <altekruseja...@gmail.com>
Subject Re: Support to reset an option
Date Tue, 28 Jul 2015 19:11:36 GMT
One note on Jacques point about the compound identifiers. To maintain
backwards compatibility we are going to need to fudge these new multipart
identifiers together with the old single part identifiers that were using
previously.

In particular for Drill, this could be as simple as maintaining the current
data structure, which is just a map between strings for option names and
option values themselves, with the extra consideration that compound names
will need to be canonicalized into a standard singular string. The
alternative would be to replace the structure with a map from a nested name
representation to option values, with all of the flattened option names
registered at the root. This is something that can be handled by each user
of calcite individually, but I thought it might be worth thinking about the
best way to advise these two cases working together now that there is a
need for backwards compatibility.

On Tue, Jul 28, 2015 at 8:15 AM, Julian Hyde <jhyde@apache.org> wrote:

> Create a test case similar to SqlParserTest.testSqlOptions... the rest
> should follow...
>
> On Tue, Jul 28, 2015 at 6:07 AM, Jacques Nadeau <jacques@apache.org>
> wrote:
> > Ps, the word at the beginning of that email should have been "if"
> > On Jul 28, 2015 6:06 AM, "Jacques Nadeau" <jacques@apache.org> wrote:
> >
> >> Of you're making changes there anyway,  can you make two additional
> >> changes:
> >>
> >> Allow "alter session" to be optional for setting.
> >> Allow a multipart identifier (so we don't have to quote a.b.c (same as
> >> Schema or column identifiers in project lists).
> >>
> >> This would substantially improve usability.
> >> On Jul 27, 2015 6:53 PM, "Sudheesh Katkam" <skatkam@maprtech.com>
> 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
> >>
> >>
>

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