Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4918

Support getting column comments via HS2

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.5.0
    • Fix Version/s: Impala 2.11.0
    • Component/s: Catalog
    • Labels:

      Description

      I create table including column comment in impala-shell as following:
      create table test(a int comment 'dddd');

      Then I use jdbc class DatabaseMetaData to get column name and comment as following:
      Class.forName("org.apache.hive.jdbc.HiveDriver");
      Connection conn = DriverManager.getConnection("jdbc:hive2://10.43.183.142:21050/default;auth=noSasl", "impala", "impala");
      DatabaseMetaData dbmd = conn.getMetaData();
      ResultSet rs = dbmd.getColumns(null, null, "test", null);
      while (rs.next())

      { String name = rs.getString("COLUMN_NAME"); int type = rs.getType(); String remarks = Strings.nullToEmpty(rs.getString("REMARKS")); System.out.print("name:" + name + " remarks:" + remarks + " \n"); }

      I get column correctly but get comment null.
      I use DatabaseMetaData to get column name and comment from table hive. It work correctly,I can get both of them.

      So, can't get column comment in query to Impala table is a bug need to be fixed.

        Attachments

          Activity

            People

            • Assignee:
              csringhofer Csaba Ringhofer
              Reporter:
              davidxdh Donghui Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: