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

Add support for JDBC PreparedStatements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6.0
    • 0.7.0
    • JDBC
    • None
    • Reviewed
    • Many methods in HivePreparedStatement have been implemented. This cases "change log" attachment summarizes all changes.

    Description

      As a result of a Sprint which had us using Pentaho Data Integration with the Hive database we have updated the driver. Many PreparedStatement methods have been implemented. A patch will be attached tomorrow with a summary of changes.

      Note: A checkout of Hive/trunk was performed and the TestJdbcDriver test cased was run. This was done before any modifications were made to the checked out project. The testResultSetMetaData failed:

      java.sql.SQLException: Query returned non-zero code: 9, cause: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MapRedTask
      at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:189)
      at org.apache.hadoop.hive.jdbc.TestJdbcDriver.testResultSetMetaData(TestJdbcDriver.java:530)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420)
      at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
      at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)

      A co-worker did the same and the tests passed. Both environments were Ubuntu and Hadoop version 0.20.2.

      Tests added to the TestJdbcDriver by us were successful.

      Attachments

        1. HIVE-1536-3.patch
          5 kB
          Sean Flatley
        2. TestJdbcDriver-ant-3.log
          193 kB
          Sean Flatley
        3. HIVE-1536-changes-3.txt
          0.6 kB
          Sean Flatley
        4. HIVE-1536-2.patch
          18 kB
          Sean Flatley
        5. HIVE-1536-changes-2.txt
          3 kB
          Sean Flatley
        6. JdbcDriverTest-ant-2.log
          191 kB
          Sean Flatley
        7. HIVE-1536.patch
          44 kB
          Sean Flatley
        8. JdbcDriverTest-ant.log
          108 kB
          Sean Flatley
        9. all-tests-ant.log
          53 kB
          Sean Flatley
        10. HIVE-1536-changes.txt
          2 kB
          Sean Flatley

        Issue Links

          Activity

            People

              sflatley@pentaho.com Sean Flatley
              sflatley@pentaho.com Sean Flatley
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: