Github user kaspersorensen commented on a diff in the pull request:
https://github.com/apache/metamodel/pull/187#discussion_r215826872
--- 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 --
In other words: Closing it here may render the returned dataset useless.---
