Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3151

ResultSetMetaData not as specified by JDBC (null/dummy value, not ""/etc.)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • Client - JDBC
    • None

    Description

      In Drill's JDBC driver, some ResultSetMetaData methods don't return what JDBC specifies they should return.

      Some cases:

      getTableName(int):

      • (JDBC says: table name or "" if not applicable)
      • Drill returns null (instead of empty string or table name)
      • (Drill indicates "not applicable" even when from named table, e.g., for "SELECT * FROM INFORMATION_SCHEMA.CATALOGS".)

      getSchemaName(int):

      • (JDBC says: schema name or "" if not applicable)
      • Drill returns "--UNKNOWN--" (instead of empty string or schema name)
      • (Drill indicates "not applicable" even when from named table, e.g., for "SELECT * FROM INFORMATION_SCHEMA.CATALOGS".)

      getCatalogName(int):

      • (JDBC says: the name of the catalog for the table in which the given column appears or "" if not applicable)
      • Drill returns "--UNKNOWN--" (instead of empty string or catalog name)
      • (Drill indicates "not applicable" even when from named table, e.g., for "SELECT * FROM INFORMATION_SCHEMA.CATALOGS".)

      isSearchable(int):

      • (JDBC says: Indicates whether the designated column can be used in a where clause.)
      • Drill returns false.

      getColumnClassName(int:

      • (JDBC says: the fully-qualified name of the class in the Java programming language that would be used by the method ResultSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping.)
      • Drill returns "none" (instead of the correct class name).

      More cases:

      getColumnDisplaySize

      • (JDBC says (quite ambiguously): the normal maximum number of characters allowed as the width of the designated column)
      • Drill always returns 10!

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dsbos Daniel Barclay
            dsbos Daniel Barclay
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment