Hive
  1. Hive
  2. HIVE-4549

JDBC compliance change TABLE_SCHEMA to TABLE_SCHEM

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.12.0
    • Component/s: JDBC
    • Labels:
    • Environment:

      Hive 0.10

      Description

      The ResultSet returned by HiveDatabaseMetadata.getTables has the metadata columns TABLE_CAT, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, REMARKS. The second column name is not compliant with the JDBC standard (http://docs.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getSchemas()): the column name should be TABLE_SCHEM instead of TABLE_SCHEMA.

      Suggested fix in Hive (org.apache.hive.service.cli.operation.GetTablesOperation.java) change from

      private static final TableSchema RESULT_SET_SCHEMA = new TableSchema()
      .addStringColumn("TABLE_CAT", "Catalog name. NULL if not applicable.")
      .addStringColumn("TABLE_SCHEMA", "Schema name.")
      .addStringColumn("TABLE_NAME", "Table name.")
      .addStringColumn("TABLE_TYPE", "The table type, e.g. \"TABLE\", \"VIEW\", etc.")
      .addStringColumn("REMARKS", "Comments about the table.");

      to

      private static final TableSchema RESULT_SET_SCHEMA = new TableSchema()
      .addStringColumn("TABLE_CAT", "Catalog name. NULL if not applicable.")
      .addStringColumn("TABLE_SCHEM", "Schema name.")
      .addStringColumn("TABLE_NAME", "Table name.")
      .addStringColumn("TABLE_TYPE", "The table type, e.g. \"TABLE\", \"VIEW\", etc.")
      .addStringColumn("REMARKS", "Comments about the table.");

      1. HIVE-4549-1.patch
        3 kB
        Prasad Mujumdar

        Activity

        Hide
        Ashutosh Chauhan added a comment -

        This issue has been fixed and released as part of 0.12 release. If you find further issues, please create a new jira and link it to this one.

        Show
        Ashutosh Chauhan added a comment - This issue has been fixed and released as part of 0.12 release. If you find further issues, please create a new jira and link it to this one.
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-hadoop2 #234 (See https://builds.apache.org/job/Hive-trunk-hadoop2/234/)
        HIVE-4549 : JDBC compliance change TABLE_SCHEMA to TABLE_SCHEM (Prasad Mujumdar via Navis) (Revision 1491676)

        Result = ABORTED
        navis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1491676
        Files :

        • /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        • /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java
        • /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-hadoop2 #234 (See https://builds.apache.org/job/Hive-trunk-hadoop2/234/ ) HIVE-4549 : JDBC compliance change TABLE_SCHEMA to TABLE_SCHEM (Prasad Mujumdar via Navis) (Revision 1491676) Result = ABORTED navis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1491676 Files : /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #2137 (See https://builds.apache.org/job/Hive-trunk-h0.21/2137/)
        HIVE-4549 : JDBC compliance change TABLE_SCHEMA to TABLE_SCHEM (Prasad Mujumdar via Navis) (Revision 1491676)

        Result = FAILURE
        navis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1491676
        Files :

        • /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        • /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java
        • /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #2137 (See https://builds.apache.org/job/Hive-trunk-h0.21/2137/ ) HIVE-4549 : JDBC compliance change TABLE_SCHEMA to TABLE_SCHEM (Prasad Mujumdar via Navis) (Revision 1491676) Result = FAILURE navis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1491676 Files : /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java
        Hide
        Navis added a comment -

        Committed to trunk. Thanks Prasad!

        Show
        Navis added a comment - Committed to trunk. Thanks Prasad!
        Hide
        Shreepadma Venugopalan added a comment -

        +1 (non-committer). LGTM.

        Show
        Shreepadma Venugopalan added a comment - +1 (non-committer). LGTM.
        Hide
        Prasad Mujumdar added a comment -
        Show
        Prasad Mujumdar added a comment - Review request on https://reviews.apache.org/r/11706/
        Hide
        Ashutosh Chauhan added a comment -

        Hi Johndee Burks would you like to format your suggested change as patch and submit ?

        Show
        Ashutosh Chauhan added a comment - Hi Johndee Burks would you like to format your suggested change as patch and submit ?

          People

          • Assignee:
            Prasad Mujumdar
            Reporter:
            Johndee Burks
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development