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

Chaoyu Tang commented on HIVE-10732:
------------------------------------

[~xuefuz] The stmtHandle in HiveQueryResultSet can be set from HiveStatement or 
HiveDatabaseMetaData. If the variable "statement" in HiveQueryResultSet is not 
null, the stmtHandle was from HiveStatement, otherwise from 
HiveDatabaseMetaData. In method close(), patch#0 closes HiveStatement 
stmtHandle(TOperationHandle) using s.closeClientOperation(), and close the 
already closed TOperationHandle again using closeOperationHandle(), so we see 
such exceptions in the failed tests. 
But patch#1 closes HiveStatement stmtHandle once by s.closeClientOperation(), 
and closes HiveDatabaseMetaData stmtHandle by closeOperationHandle().

> Hive JDBC driver does not close operation for metadata queries
> --------------------------------------------------------------
>
>                 Key: HIVE-10732
>                 URL: https://issues.apache.org/jira/browse/HIVE-10732
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>            Reporter: Mala Chikka Kempanna
>            Assignee: Chaoyu Tang
>         Attachments: HIVE-10732.1.patch, HIVE-10732.patch
>
>
> In following file
> http://github.mtv.cloudera.com/CDH/hive/blob/cdh5-0.14.1/jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java
> Line 315 implemented the ResultSet.close() method. Because "DatabaseMetadata" 
> operation doesn't have a statement, it doesn't "close" the operation. 
> However, regardless whether it has a statement or not, it should close the 
> operation through the "stmtHandle".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to