Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-8889

JDBC Driver ResultSet.getXXXXXX(String columnLabel) methods Broken

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.13.1
    • Fix Version/s: 1.1.0, 1.0.2
    • Component/s: None
    • Labels:
      None

      Description

      Using hive-jdbc-0.13.1-cdh5.2.0.jar.

      All of the get-by-column-label methods of HiveBaseResultSet are now broken. They don't take just the column label as they should. Instead you have to pass in <table name>.<column name>. This requirement doesn't conform to the java ResultSet API which specifies:

      "columnLabel - the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column"

      Looking at the code, it seems that the problem is that findColumn() method is looking in normalizedColumnNames instead of the columnNames.

      BTW, Another annoying issue with the code is that the SQLException thrown gives no indication of what the problem is. It should at least say that the column name wasn't found in the description string.

        Attachments

        1. HIVE-8889.patch
          8 kB
          Chaoyu Tang
        2. HIVE-8889.1.patch
          8 kB
          Chaoyu Tang
        3. HIVE-8889.2.patch
          4 kB
          Chaoyu Tang

          Activity

            People

            • Assignee:
              ctang Chaoyu Tang
              Reporter:
              glingle G Lingle
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: