In answer to your question, no I don't think Calcite should support SELECT INTO.

On Tue, Jun 11, 2019 at 2:53 PM Andrew O <ao2596...@gmail.com> wrote:
>
> Indeed,  unfortunately in this case it's pre-generated SQL so unfortunately
> is a fixed input style.
>
> On Tue, 11 Jun 2019, 22:41 Julian Hyde, <jhyde.apa...@gmail.com> wrote:
>
> > I’ve never understood why some SQL dialects have “SELECT ... INTO table”.
> > What’s wrong with “INSERT INTO table SELECT ...”?
> >
> > Julian
> >
> > > On Jun 11, 2019, at 1:27 PM, Andrew O <ao2596...@gmail.com> wrote:
> > >
> > > Does / should Calcite support select into expressions? E.g. I'm using
> > v1.19
> > > with queries of the style:
> > >
> > >       select * into temporary table "#myTempResults" from (select colA
> > > from my Table where colA = 'abc')
> > >
> > > but these queries fail to parse at the "into" words in the expression. (I
> > > have a calcite connection setup with SqlDdlParserImpl)
> > >
> > > Assuming this isn't currently supported, is this something that is in the
> > > scope of the default Calcite code,  or something that would need to be a
> > > custom extension?
> > >
> > > I do see in Schema.TableType there is an enum value of TEMPORARY_TABLE,
> > but
> > > I have found where us this set / used.
> > >
> > > Also,  as additional context
> > > - my target DB for the queries is Postgres (so supports this SQL query
> > > directly)
> > > - also in the future I would like to support parsing / processing Cursor
> > > related operations (e.g. Declare Cursor,  fetch next,  fetch next, etc.).
> > > Although I'm sure if / where these would belong in Calcite.
> > >
> > > Thanks in advance
> > >
> > > Andrew
> >

Reply via email to