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

getTables returns empty result in JdbcMeta

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0
    • None
    • 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
          15 kB
          Jan Van Besien
        2. CALCITE-905.patch
          1.0 kB
          Jan Van Besien

        Activity

          People

            julianhyde Julian Hyde
            janvanbesien Jan Van Besien
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: