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

Julian Hyde commented on CALCITE-6207:
--------------------------------------

If {{connection.getMetaData()}} or {{dialectFactory.create(metaData)}} throws 
an exception and then {{connection.close()}} throws an exception, your logic 
would throw the exception from {{connection.close()}}, but the current logic 
would throw the original exception. I'm not sure which of these is better, but 
people seem to be happy with the current behavior.

> Improve connection resource in JDBCUtils
> ----------------------------------------
>
>                 Key: CALCITE-6207
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6207
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.36.0
>            Reporter: xy
>            Priority: Major
>              Labels: pull-request-available
>
> Improve JDBC connection resource in JDBCUtils: not need multiple judge 
> connection whether close



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to