[jira] [Created] (FLINK-18061) TableResult#collect should return closeable iterator to avoid resource leak

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-18061) TableResult#collect should return closeable iterator to avoid resource leak

Shang Yuanchun (Jira)
godfrey he created FLINK-18061:
----------------------------------

             Summary: TableResult#collect should return closeable iterator to avoid resource leak
                 Key: FLINK-18061
                 URL: https://issues.apache.org/jira/browse/FLINK-18061
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / API
            Reporter: godfrey he
             Fix For: 1.11.0


as discussed in ML: http://mail-archives.apache.org/mod_mbox/flink-dev/202005.mbox/%3CCADQYLGuk%2BnnrPv-PR6Gi7D_rZqp_DhjfA%3DVtkRB-aGPxYxOQPw%40mail.gmail.com%3E, we should return a closeable iterator for TableResult#collect method *to avoid resource leak*. The suggested change is:

public interface TableResult {

  CloseableRowIterator collect();

}

public interface CloseableRowIterator extends Iterator<Row>, AutoCloseable {

}

This change does not break current api.



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