Am Di., 28. Dez. 2021 um 23:13 Uhr schrieb Julian Hyde <
[email protected]>:
> That looks right. So we may have a bug. Also try
>
> md.getTables(null, null, "%", new String[] {“TABLE”}));
>
> and
>
> md.getTables(“", null, "%", new String[] {“TABLE”}));
>
Same result, no sub-schema tables are returned.
I've logged https://issues.apache.org/jira/browse/CALCITE-4969 for this.
Julian
>
Thanks,
--Gunnar
>
>
> > On Dec 28, 2021, at 1:45 PM, Gunnar Morling
> <[email protected]> wrote:
> >
> > Hi,
> >
> > I have created a custom Calcite schema factory which produces a parent
> > schema which in turn contains multiple sub-schemas. I can query those
> > tables as intended, e.g. SELECT * FROM schemaname.tablename.
> >
> > I am struggling though to obtain all the tables via JDBC metadata, the
> > following doesn't return any subschema tables (note how the schema filter
> > is null):
> >
> > DatabaseMetaData md = connection.getMetaData();
> > ResultSet rs = md.getTables(null, null, "%", null));
> >
> > Is this an expected behavior? If so, what would I have to do in order to
> > obtain the metadata for tables in any sub-schema? I don't think I should
> > return any sub-schema tables from getTable() in the parent schema, or
> > should I?
> >
> > Thanks a lot for any advice,
> >
> > --Gunnar
>
>