We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2329174 commit 3c2c004Copy full SHA for 3c2c004
1 file changed
flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/ArrowFlightConnection.java
@@ -20,6 +20,7 @@
20
21
import io.netty.util.concurrent.DefaultThreadFactory;
22
import java.sql.SQLException;
23
+import java.util.List;
24
import java.util.Properties;
25
import java.util.concurrent.ExecutorService;
26
import java.util.concurrent.Executors;
@@ -180,6 +181,12 @@ public Properties getClientInfo() {
180
181
182
@Override
183
public void close() throws SQLException {
184
+ // Clean up any open Statements
185
+ try {
186
+ AutoCloseables.close(List.copyOf(statementMap.values()));
187
+ } catch (final Exception e) {
188
+ throw AvaticaConnection.HELPER.createException(e.getMessage(), e);
189
+ }
190
clientHandler.close();
191
if (executorService != null) {
192
executorService.shutdown();
0 commit comments