[
https://issues.apache.org/jira/browse/CALCITE-4969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17466372#comment-17466372
]
Gunnar Morling commented on CALCITE-4969:
-----------------------------------------
The sub-schema tables are also not showing up for {{!tables}} in SQLLine
(though again, I can query them just fine). Interestingly, tables from the
"metadata" schema do show up, perhaps that's handled in some special way?
{code}
0: jdbc:calcite:schemaFactory=org.moditect.jf> !tables
+-----------+-------------+------------+--------------+---------+----------+------------+-----------+---------------------------+----------------+
| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE | REMARKS | TYPE_CAT |
TYPE_SCHEM | TYPE_NAME | SELF_REFERENCING_COL_NAME | REF_GENERATION |
+-----------+-------------+------------+--------------+---------+----------+------------+-----------+---------------------------+----------------+
| | metadata | COLUMNS | SYSTEM TABLE | | |
| | | |
| | metadata | TABLES | SYSTEM TABLE | | |
| | | |
+-----------+-------------+------------+--------------+---------+----------+------------+-----------+---------------------------+----------------+
{code}
> Can't retrieve metadata for tables in sub-schemas
> -------------------------------------------------
>
> Key: CALCITE-4969
> URL: https://issues.apache.org/jira/browse/CALCITE-4969
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.28.0
> Reporter: Gunnar Morling
> Priority: Major
>
> 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.
> Metadata retrieval for these tables via JDBC fails though; the following
> doesn't return any subschema tables (note how the schema filter is null):
> {code}
> DatabaseMetaData md = connection.getMetaData();
> ResultSet rs = md.getTables(null, null, "%", null));
> {code}
> [Reported|https://mail-archives.apache.org/mod_mbox/calcite-dev/202112.mbox/%3CCADGJaX9jN8BN_C%2BZswcDspfFYdWZ5p%3DxNey4ho1QZwpjFtAehw%40mail.gmail.com%3E]
> on the mailing list initially.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)