Hey Julien,

Am Di., 21. Feb. 2023 um 23:01 Uhr schrieb Julian Hyde <[email protected]>:

> A classic problem of open source development. Should we accept a
> contribution for recursive queries even though it doesn't have SQL
> support? And if we choose to accept it without SQL support, do we show
> the equivalent SQL in our documentation?
>

Yes, the struggle is real, and there's no simple answer. Being a maintainer
of multiple open-source projects myself, I very much can relate to that.
FWIW, I think you made the right call by accepting the feature in its
current state. It then comes down to expectation management, i.e. being
very transparent about what is supported and what isn't.

>
> I agree that the documentation is a bit misleading. The caveats about
> "experimental APIs" mostly cover it, but it should say that "WITH
> RECURSIVE" SQL is not currently supported. But you are also
> complaining that the free lunch has french fries and baked potatoes
> but no mashed potatoes.
>

Ugh, now that's a bit harsh, don't you think? I've asked for clarification
about how to use this feature, and when learning that right now it isn't,
I've offered to help clarify that fact in the doc (as much as I'd love help
building the actual feature, it's just beyond the scope of what my time
currently allows for, unfortunately). I think that hardly qualifies as
"complaining".

Best,

--Gunnar

Julian
>
> On Tue, Feb 21, 2023 at 1:06 PM Gunnar Morling
> <[email protected]> wrote:
> >
> > Hey Ruben,
> >
> > Thanks a lot for the quick response! In that light, isn't having that SQL
> > example in the docs a bit confusing then? Might be worth clarifying for
> the
> > time being that this is a hypothetical syntax and recursive queries are
> > only supported in the RelBuilder API? Happy to send a PR for doing that
> doc
> > update, if you think it makes sense and can point me to the source of
> that
> > page.
> >
> > Thanks again,
> >
> > --Gunnar
> >
> >
> > Am Di., 21. Feb. 2023 um 20:56 Uhr schrieb Ruben Q L <[email protected]
> >:
> >
> > > Hello Gunnar,
> > >
> > > At the moment, recursive queries are only supported via RelBuilder
> API, not
> > > via SQL (the documentation shows the SQL equivalent to the RelBuider
> code
> > > just below, but Calcite currently only supports the latter, not the
> > > former).
> > >
> > > There is an old ticket about supporting this feature in SQL [1] , but
> so
> > > far no work has been done in this regard.
> > >
> > > Best regards,
> > > Ruben
> > >
> > > [1] https://issues.apache.org/jira/browse/CALCITE-129
> > >
> > >
> > > On Tue, Feb 21, 2023 at 7:23 PM Gunnar Morling
> > > <[email protected]> wrote:
> > >
> > > > Hi,
> > > >
> > > > I'm trying to run the recursive example from the Calcite algebra docs
> > > [1],
> > > > but I'm always getting an error at the RECURSIVE keyword:
> > > >
> > > >     WITH RECURSIVE aux(i) AS (
> > > >       VALUES (1)
> > > >       UNION ALL
> > > >       SELECT i+1 FROM aux WHERE i < 10
> > > >     )
> > > >     SELECT * FROM aux
> > > >
> > > >     "Incorrect syntax near the keyword 'RECURSIVE' at line 1, column
> 6"
> > > >
> > > > I saw this is considered an experimental feature for the time being,
> is
> > > > there some flag/option I need to specify when creating my connection
> to
> > > > enable support for recursive queries?
> > > >
> > > > Thanks a lot for any help,
> > > >
> > > > --Gunnar
> > > >
> > > > [1] https://calcite.apache.org/docs/algebra.html#recursive-queries
> > > >
> > >
>

Reply via email to