Hi Leon,

What do you mean recognize it as a raw table?

If you don't want to perform validation for a given query then you can
simply use the SqlParser who doesn't
care if the table exists or not.

Best,
Stamatis



On Sun, Aug 18, 2019 at 3:59 PM Leon Xu <[email protected]> wrote:

> Thanks Julian, another follow-up question, is there a way to ask Calcite to
> ignore validating a table if that table is not found?
> In the example I gave: In node2, we have query: `select a, b from foo;`
> I might not have information about table `foo`, is there a way to ask
> calcite to just recognize it as a raw table and proceed with validation?
> By default setting it will errors out with object 'foo' not found, if I am
> using parser to validate the sql.
>
> Thanks
> Leon
>
> On Sat, Aug 17, 2019 at 12:29 AM Julian Hyde <[email protected]>
> wrote:
>
> > That is standard view expansion. We support this.
> >
> > Julian
> >
> > > On Aug 16, 2019, at 06:12, Leon Xu <[email protected]> wrote:
> > >
> > > Hi Calcite devs,
> > >
> > > We are modeling a usecase using a DAG. Each node in the DAG will be
> some
> > > select query. We would like to use calcite to convert all these queries
> > > into one consolidated query.
> > > e.g.
> > > In node1, we have query: `select a from node2;`
> > > In node2, we have query: `select a, b from foo;`
> > >
> > > should be converted to `select a from (select a, b from foo);`
> > >
> > > If we were to use calcite to achieve this, what would be the best
> > > implementation? Should I extend a substituionVisitor and replace table
> > name
> > > with the correspoinding query?
> > >
> > > Thanks
> >
>

Reply via email to