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

JDBC DatabaseMetaData and ResultSetMetaData need to match for particular types

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: JDBC
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      My patch for HIVE-1631 did not ensure the following (from comment on 1631):
      -------------
      Mythili Gopalakrishnan added a comment - 08/Aug/11 08:42

      Just tested this fix and does NOT work correctly. Here are my findings on a FLOAT column

      Without Patch on a FLOAT Column
      --------------------------------
      DatabaseMetaData.getColumns () COLUMN_SIZE returns 12
      DatabaseMetaData.getColumns () DECIMAL_DIGITS - returns 0

      ResultSetMetaData.getPrecision() returns 0
      ResultSetMetaData.getScale() returns 0

      With Patch on a FLOAT Column
      ----------------------------
      DatabaseMetaData.getColumns () COLUMN_SIZE returns 24
      DatabaseMetaData.getColumns () DECIMAL_DIGITS - returns 0

      ResultSetMetaData.getPrecision() returns 7
      ResultSetMetaData.getScale() returns 7

      Also both DatabaseMetadata and ResultSetMetaData must return the same information for Precision and Scale for FLOAT,DOUBLE types.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                phunt Patrick Hunt
                Reporter:
                phunt Patrick Hunt
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: