[ 
https://issues.apache.org/jira/browse/HIVE-23601?focusedWorklogId=443281&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-443281
 ]

ASF GitHub Bot logged work on HIVE-23601:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Jun/20 16:59
            Start Date: 09/Jun/20 16:59
    Worklog Time Spent: 10m 
      Work Description: belugabehr commented on pull request #1054:
URL: https://github.com/apache/hive/pull/1054#issuecomment-641446810


   @nrg4878 Can you review?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 443281)
    Time Spent: 20m  (was: 10m)

> Hive Statement Clear Statement Handle on Error
> ----------------------------------------------
>
>                 Key: HIVE-23601
>                 URL: https://issues.apache.org/jira/browse/HIVE-23601
>             Project: Hive
>          Issue Type: Bug
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {code:java}
>   private void closeStatementIfNeeded() throws SQLException {
>     try {
>       if (stmtHandle != null) {
>         TCloseOperationReq closeReq = new TCloseOperationReq(stmtHandle);
>         TCloseOperationResp closeResp = client.CloseOperation(closeReq);
>         Utils.verifySuccessWithInfo(closeResp.getStatus());
>         stmtHandle = null;
>       }
>     } catch (SQLException e) {
>       throw e;
>     } catch (Exception e) {
>       throw new SQLException("Failed to close statement", "08S01", e);
>     }
>   }
>  void closeClientOperation() throws SQLException {
>     closeStatementIfNeeded();
>     isQueryClosed = true;
>     stmtHandle = null;
>   }
> {code}
> {{verifySuccessWithInfo}} throws an {{Exception}} if it finds an error code 
> and therefore leapfrogs over setting the statement handle to null (twice).  
> Probably not what is intended since the original author(s) are tried twice to 
> null it out.



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

Reply via email to