[
https://issues.apache.org/jira/browse/CALCITE-905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Van Besien updated CALCITE-905:
-----------------------------------
Attachment: CALCITE-905.patch
Proper patch with test this time.
I had to fix the protobuf RPC as well by adding an extra boolean in the
TablesRequest to express whether the typeList is empty or null. This is similar
to what was already done in FetchRequest for parameterValues.
I also noticed a documentation glitch in howto.md. It explains to use
protobuf-3.0.0-beta-1 while I had to use protobuf-3.0.0-alpha-2 to make it work
(same as in pom.xml). This might also suggest the maven dependency needs to be
updated to beta1 of course.
> getTables returns empty result in JdbcMeta
> ------------------------------------------
>
> Key: CALCITE-905
> URL: https://issues.apache.org/jira/browse/CALCITE-905
> Project: Calcite
> Issue Type: Bug
> Reporter: Jan Van Besien
> Assignee: Julian Hyde
> Attachments: CALCITE-905.patch, CALCITE-905.patch
>
>
> getTables on the metadata of a connection does not work (returns empty
> ResultSet) with avatica remoting using a JdbcMeta.
> {code}
> connection.getMetaData().getTables(null, null, null, null);
> {code}
> The problem seems to be related to the String[] types argument of the
> getTables method, this works as expected:
> {code}
> connection.getMetaData().getTables(null, null, null, new String[]{"TABLE"});
> {code}
> I think it boils down to the JdbcMeta#toArray(List<String> typeList) method
> which returns an empty array in stead of null, resulting in the creation of
> an incorrect typeFilter in CalciteMetaImpl#getTables (line 254).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)