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

Support getting column comments via HS2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 2.5.0
    • Impala 2.11.0
    • Catalog

    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

            csringhofer Csaba Ringhofer
            davidxdh Davy Xu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: