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

Hive JDBC doesn't support TIMESTAMP column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.8.1, 0.9.0
    • 0.10.0
    • JDBC
    • None
    • Reviewed

    Description

      Steps to replicate:
      1. Create a table with at least one column of type TIMESTAMP
      2. Do a DatabaseMetaData.getColumns () such that this TIMESTAMP column is part of the resultset.
      3. When you iterate over the TIMESTAMP column it would fail, throwing the below exception:

      Exception in thread "main" java.sql.SQLException: Unrecognized column type: timestamp
      at org.apache.hadoop.hive.jdbc.Utils.hiveTypeToSqlType(Utils.java:56)
      at org.apache.hadoop.hive.jdbc.JdbcColumn.getSqlType(JdbcColumn.java:62)
      at org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData$2.next(HiveDatabaseMetaData.java:244)

      Attachments

        1. HIVE-2957.patch
          2 kB
          Bharath Ganesh
        2. HIVE-2957.2.patch.txt
          7 kB
          tamtam180
        3. HIVE-2957.3.patch
          7 kB
          Richard Ding
        4. JDBC_ResultSet_Conversion_Chart.png
          133 kB
          Carl Steinbach
        5. HIVE-2957.4.patch
          7 kB
          Richard Ding

        Issue Links

          Activity

            People

              rding Richard Ding
              bharathganesh Bharath Ganesh
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: