Amol Dixit created HIVE-23794:
---------------------------------

             Summary: HiveConnection.rollback always throws a "Method not 
supported" exception
                 Key: HIVE-23794
                 URL: https://issues.apache.org/jira/browse/HIVE-23794
             Project: Hive
          Issue Type: Bug
            Reporter: Amol Dixit


HiveConnection.rollback automatically generated implementation always throws a 
generic "Method not supported" exception and thus is not compliant with the 
JDBC spec. For HiveConnection autoCommit mode is always on and this connection 
do not allow to set the autoCommit mode to false. If setAutoCommit is called 
and the auto-commit mode is not changed, the call is a no-op.

Per JDBC spec, an exception can be thrown only if the connection is closed, DB 
access error occurs or the method is called during a transaction (which is not 
a case for HiveConnection).

JDBC spec does not say a word about not supporting the method by the driver. 
The most correct behavior could be to throw only if the request tries to 
explicitly call rollback (as HiveConnection.getAutoCommit always returns true 
and setAutoCommit call is no-op).

This issue is a blocker for JDBC connection pools (i.e. HikariCP) that expect 
JDBC-compliant behavior from the driver.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to