Github user kaspersorensen commented on a diff in the pull request:
https://github.com/apache/metamodel/pull/187#discussion_r215826834
--- Diff: jdbc/src/main/java/org/apache/metamodel/jdbc/JdbcDataContext.java
---
@@ -513,6 +514,8 @@ protected DataSet executeQuery(Connection connection,
Query query, boolean close
// otherwise
close(connection);
throw e;
+ } finally {
+ FileHelper.safeClose(statement);
--- End diff --
This may be too early to close the statement. It goes into the JdbcDataSet
so that when you close the dataset, the statement is also closed.
---