Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-905

getTables returns empty result in JdbcMeta

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:
      None

      Description

      getTables on the metadata of a connection does not work (returns empty ResultSet) with avatica remoting using a JdbcMeta.

      connection.getMetaData().getTables(null, null, null, null);
      

      The problem seems to be related to the String[] types argument of the getTables method, this works as expected:

      connection.getMetaData().getTables(null, null, null, new String[]{"TABLE"});
      

      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).

        Attachments

        1. CALCITE-905.patch
          1.0 kB
          Jan Van Besien
        2. CALCITE-905.patch
          15 kB
          Jan Van Besien

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              janvanbesien Jan Van Besien
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: