[ https://issues.apache.org/jira/browse/HIVE-23794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17899807#comment-17899807 ]
Qiheng He commented on HIVE-23794: ---------------------------------- - I confirmed the existence of this issue at https://github.com/apache/shardingsphere/pull/33739 . Why is it designed like this? > 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 > Assignee: Amol Dixit > Priority: Major > > 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.20.10#820010)