Hive
  1. Hive
  2. HIVE-1101

Extend Hive ODBC to support more functions

    Details

    • Type: New Feature New Feature
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ODBC
    • Labels:
      None

      Description

      Currently Hive ODBC driver only support a a minimum list of functions to ensure some application work. Some other applications require more function support. These functions include:

      *SQLCancel
      *SQLFetchScroll
      *SQLGetData
      *SQLGetInfo
      *SQLMoreResults
      *SQLRowCount
      *SQLSetConnectAtt
      *SQLSetStmtAttr
      *SQLEndTran
      *SQLPrepare
      *SQLNumParams
      *SQLDescribeParam
      *SQLBindParameter
      *SQLGetConnectAttr
      *SQLSetEnvAttr
      *SQLPrimaryKeys (not ODBC API? Hive does not support primary keys yet)
      *SQLForeignKeys (not ODBC API? Hive does not support foreign keys yet)

      We should support as many of them as possible.

      1. HIVE-1101.patch
        1.67 MB
        Ning Zhang
      2. odbc-build.patch
        1.68 MB
        Prasad Mujumdar
      3. odbc-src.patch
        617 kB
        Prasad Mujumdar
      4. unixODBC-2.2.14-p2-HIVE-1101.tar.gz
        2.23 MB
        Carl Steinbach

        Issue Links

          Activity

          Hide
          Ning Zhang added a comment -

          Uploading patch HIVE-1101.patch. Since unixODBC is not compatible to Apache license, you need to apply this patch to unixODBC 2.2.14 and build yourself. This patch is based on the patch in HIVE-187 and can be applied directly to unixODBC 2.2.14. The major change is to implement a simple SQLGetInfo to support MSTR v.9. Other changes are to the connection and disconnection code (SQLDriverConnect.c, SQLConnect.c, SQLFreeConnect.c etc.) to get the configuration info from odbc.ini.

          Note:
          1) unixODBC and MSTR both have DriverManager (libodbc.so, libodbcinst.so). You need to set LD_LIBRARY_PATH correspondingly when you run configuration and make this driver.
          2) Since MSTR v9 support 32-bit driver only, you need to compile all dynamic libraries to 32-bit binaries. These include unixODBC, hiveclient, and thrift. Please refer to HIVE-187 and http://wiki.apache.org/hadoop/Hive/HiveODBC for more information.

          Show
          Ning Zhang added a comment - Uploading patch HIVE-1101 .patch. Since unixODBC is not compatible to Apache license, you need to apply this patch to unixODBC 2.2.14 and build yourself. This patch is based on the patch in HIVE-187 and can be applied directly to unixODBC 2.2.14. The major change is to implement a simple SQLGetInfo to support MSTR v.9. Other changes are to the connection and disconnection code (SQLDriverConnect.c, SQLConnect.c, SQLFreeConnect.c etc.) to get the configuration info from odbc.ini. Note: 1) unixODBC and MSTR both have DriverManager (libodbc.so, libodbcinst.so). You need to set LD_LIBRARY_PATH correspondingly when you run configuration and make this driver. 2) Since MSTR v9 support 32-bit driver only, you need to compile all dynamic libraries to 32-bit binaries. These include unixODBC, hiveclient, and thrift. Please refer to HIVE-187 and http://wiki.apache.org/hadoop/Hive/HiveODBC for more information.
          Hide
          Carl Steinbach added a comment -

          unixODBC-2.2.14-p2.tar.gz with HIVE-1101.patch pre-applied.

          This supercedes the patched version of unixODBC attached to HIVE-187.

          Show
          Carl Steinbach added a comment - unixODBC-2.2.14-p2.tar.gz with HIVE-1101 .patch pre-applied. This supercedes the patched version of unixODBC attached to HIVE-187 .
          Hide
          Brian Lau added a comment -

          unixODBC-2.2.14-p2-HIVE-1101/DriverManager/SQLAllocHandle.c
          contains the line
          return SQL_ERROR; // Zn: just for testing !!

          Show
          Brian Lau added a comment - unixODBC-2.2.14-p2- HIVE-1101 /DriverManager/SQLAllocHandle.c contains the line return SQL_ERROR; // Zn: just for testing !!
          Hide
          Prasad Mujumdar added a comment -

          Initial patch of the ODBC driver with additional ODBC API support, ported on with Linux and window.

          Show
          Prasad Mujumdar added a comment - Initial patch of the ODBC driver with additional ODBC API support, ported on with Linux and window.
          Hide
          Carl Steinbach added a comment -

          @Prasad: is the patch ready for review? If so can you please submit a review request? Thanks.

          Show
          Carl Steinbach added a comment - @Prasad: is the patch ready for review? If so can you please submit a review request? Thanks.

            People

            • Assignee:
              Prasad Mujumdar
              Reporter:
              Ning Zhang
            • Votes:
              1 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

              • Created:
                Updated:

                Development