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”}));

Julian


> 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

Reply via email to