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

Julian Hyde commented on CALCITE-5099:
--------------------------------------

The code looks OK to me. As long as you close the Enumerator when done. Note 
that while Enumerable implements Iterable, a Java foreach loop doesn't call 
close on the Iterator.

> ResultSetEnumerable.enumeratorBasedOnStatement  cause the backend connection 
> leak
> ---------------------------------------------------------------------------------
>
>                 Key: CALCITE-5099
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5099
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.30.0
>            Reporter: itxiangkui
>            Priority: Major
>              Labels: connection, connection-pooling, leak
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to