hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prafulla" <praful...@yahoo.com>
Subject Review Request 29448: HIVE-6992 - Support for PreparedStatement.getMetadata in hive-jdbc and server
Date Mon, 29 Dec 2014 03:24:15 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29448/
-----------------------------------------------------------

Review request for hive.


Bugs: HIVE-6992
    https://issues.apache.org/jira/browse/HIVE-6992


Repository: hive


Description
-------

HIVE-6992 - Support for PreparedStatement.getMetadata in hive-jdbc and server

This patch
1. Changes HiveSession/ICliService.executeStatement prototype to include two paramters.
   a. Boolean variable - prepareOnly to indicate if this execution request is only for preparing.
   b. existingOpHandle -  to execute prepared operation.
2. Changes TExecuteStatementReq to support above two parameters.
3. Changes SQLOperation.java to support separate preparation step.
4. Adds new OperationState called PREPARED to indicate prepared operation.
5. Refactors HiveStatement.java/HiveQueryResult to support retrieving of schema
   from HiveStatement.java.
6. Changes HiveJdbc class to support PreparedStatement.getMetadata

Also includes new (basic) unit-test for PreapredStatement.getMetadata
Test for executeStatement will be added later after initial code-review
I would like to know if my approach looks ok OR reviewers would like seperate
PreapreStatement API like ExecuteStatement


Diffs
-----

  trunk/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 1647912 
  trunk/itests/hive-unit/src/test/java/org/apache/hive/jdbc/miniHS2/TestHiveServer2.java 1647912

  trunk/itests/hive-unit/src/test/java/org/apache/hive/jdbc/miniHS2/TestHiveServer2SessionTimeout.java
1647912 
  trunk/jdbc/src/java/org/apache/hive/jdbc/HivePreparedStatement.java 1647912 
  trunk/jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java 1647912 
  trunk/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java 1647912 
  trunk/service/if/TCLIService.thrift 1647912 
  trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.h 1647912 
  trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp 1647912 
  trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TExecuteStatementReq.java
1647912 
  trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOperationState.java
1647912 
  trunk/service/src/gen/thrift/gen-py/TCLIService/ttypes.py 1647912 
  trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb 1647912 
  trunk/service/src/java/org/apache/hive/service/cli/CLIService.java 1647912 
  trunk/service/src/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java 1647912

  trunk/service/src/java/org/apache/hive/service/cli/ICLIService.java 1647912 
  trunk/service/src/java/org/apache/hive/service/cli/OperationState.java 1647912 
  trunk/service/src/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java
1647912 
  trunk/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java 1647912

  trunk/service/src/java/org/apache/hive/service/cli/operation/MetadataOperation.java 1647912

  trunk/service/src/java/org/apache/hive/service/cli/operation/Operation.java 1647912 
  trunk/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 1647912 
  trunk/service/src/java/org/apache/hive/service/cli/session/HiveSession.java 1647912 
  trunk/service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 1647912

  trunk/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java 1647912

  trunk/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java 1647912

  trunk/service/src/test/org/apache/hive/service/cli/CLIServiceTest.java 1647912 
  trunk/service/src/test/org/apache/hive/service/cli/operation/TestOperationLoggingAPI.java
1647912 
  trunk/service/src/test/org/apache/hive/service/cli/session/TestSessionGlobalInitFile.java
1647912 
  trunk/service/src/test/org/apache/hive/service/cli/thrift/ThriftCLIServiceTest.java 1647912


Diff: https://reviews.apache.org/r/29448/diff/


Testing
-------

Unit test added for PreparedStatement.getMetadata
Also tested with simple JDBC program.


Thanks,

Prafulla


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message