[ 
https://issues.apache.org/jira/browse/HIVE-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899234#action_12899234
 ] 

HBase Review Board commented on HIVE-1536:
------------------------------------------

Message from: "John Sichi" <jsi...@facebook.com>

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/663/#review928
-----------------------------------------------------------



trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveBaseResultSet.java
<http://review.cloudera.org/r/663/#comment3025>

    Looks like this got added back in by merge mistake.



trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
<http://review.cloudera.org/r/663/#comment3026>

    I don't understand this if statement...we do the same thing anyway below?



trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
<http://review.cloudera.org/r/663/#comment3027>

    Shouldn't we prevent setAutoCommit(false) rather than setAutoCommit(true)?  
Hive does not support user-level transactions.



trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java
<http://review.cloudera.org/r/663/#comment3028>

    Where did the number 100 come from?



trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java
<http://review.cloudera.org/r/663/#comment3029>

    This should be a backtick, not an apostrophe.



trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java
<http://review.cloudera.org/r/663/#comment3030>

    This is inaccurate.  The database is read/write since you can issue INSERT 
statements etc.
    



trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java
<http://review.cloudera.org/r/663/#comment3032>

    This should also close the resultSet (if there is one) before nullifying it.
    



trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java
<http://review.cloudera.org/r/663/#comment3034>

    For PreparedStatement, public executeQuery(sql) and others inherited from 
vanilla Statement should throw, since they aren't supposed to take the SQL 
string as parameter (that's what prepare is for).
    
    Instead, use a protected helper method with a different name (and share 
with HiveStatement so that excn handling code is reused).
    



trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java
<http://review.cloudera.org/r/663/#comment3035>

    Where is the maxRows enforcement implemented?  I may have missed it.  
Ideally we'd like to turn this into a LIMIT clause for efficiency, but we can 
do a followup for that.


- John





> Add support for JDBC PreparedStatements
> ---------------------------------------
>
>                 Key: HIVE-1536
>                 URL: https://issues.apache.org/jira/browse/HIVE-1536
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Drivers
>            Reporter: Sean Flatley
>            Assignee: Sean Flatley
>         Attachments: all-tests-ant.log, HIVE-1536-changes.txt, 
> HIVE-1536.patch, JdbcDriverTest-ant.log
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to