xborder commented on code in PR #1090:
URL: https://github.com/apache/arrow-java/pull/1090#discussion_r4526241498


##########
flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/ArrowFlightConnection.java:
##########
@@ -45,7 +52,10 @@ public final class ArrowFlightConnection extends 
AvaticaConnection {
   private final ArrowFlightConnectionConfigImpl config;
   private ExecutorService executorService;
   private int metadataResultSetCount;
+  // Track result sets and statements owned by this connection so close() can 
release them.
   private Map<Integer, ArrowFlightJdbcFlightStreamResultSet> 
metadataResultSetMap = new HashMap<>();
+  private final Set<AvaticaStatement> statementOwners =

Review Comment:
   This is to ensure that we close the result sets for the original statements 
when the connection is closed or reset, even if their entries in Avatica’s 
statement map have been replaced.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to