drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camuel Gilyadov <cam...@gmail.com>
Subject Re: DrQL grammar and parser
Date Sun, 26 Aug 2012 22:21:57 GMT
On Mon, Aug 27, 2012 at 12:22 AM, Ted Dunning <ted.dunning@gmail.com> wrote:

> Camuel,
> Do you have a grammar test suite that demonstrates the range of
> expressions?

I don't have an exhaustive one. But with OpenDremel I tested it with all
sample queries given in the BQL manual and then adding my own for various
cases. I can do similar thing here as well as develop grammar unit tests
(with ANTLR's gunit).

> Also, I believe that some have a goal to use additional languages besides
> SQL like languages.  A limited version of pig, for instance, would be very
> interesting.  To do this, it will be important to have a logical plan
> structure that is common for different syntaxes and is not limited to the
> idiosyncracies of any particular syntax.
> How do you think that should be handled?  Do you have an idea for a logical
> plan structure?

Yes I have, but I afraid it is a radical idea. I think queries must be
directly compiled into generic C source code. That way in worst case, a
completely separate compiler could be developed for some exotic query
language and backend could be still reused. On other extreme, dialects
could be handled in the grammar itself yielding same AST so frontend code
should not even be aware.Between these two extremes two different grammars
should be used, both yielding object models which could then handled by
same code generator (so code generator is reused). Not to say that this
approach simplifies the backend and it is most tricky part to implement as
it must be scaled and secured and outlives single query or query session.

I think an attempt to design a logical query language expressive enough to
cover many existing and future query languages would not be all that easy

> On Sun, Aug 26, 2012 at 4:11 PM, Camuel Gilyadov <camuel@gmail.com> wrote:
> > I've written and attached ANTLR grammar for DrQL which I assume is same
> as
> > BigQuery language described in Query Reference on BigQuery website. This
> > grammar includes AST production rules.
> >
> >
> >

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