File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2020
2121import io .netty .util .concurrent .DefaultThreadFactory ;
2222import java .sql .SQLException ;
23+ import java .util .List ;
2324import java .util .Properties ;
2425import java .util .concurrent .ExecutorService ;
2526import java .util .concurrent .Executors ;
@@ -180,6 +181,12 @@ public Properties getClientInfo() {
180181
181182 @ Override
182183 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+ }
183190 clientHandler .close ();
184191 if (executorService != null ) {
185192 executorService .shutdown ();
You can’t perform that action at this time.
0 commit comments