stevelorddremio commented on code in PR #42035:
URL: https://github.com/apache/arrow/pull/42035#discussion_r1635776382
##########
java/flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/client/ArrowFlightSqlClientHandler.java:
##########
@@ -194,13 +209,20 @@ public FlightInfo getInfo(final String query) {
@Override
public void close() throws SQLException {
+ if (hasCatalog()) {
+ sqlClient.closeSession(new CloseSessionRequest(), getOptions());
+ }
try {
AutoCloseables.close(sqlClient);
} catch (final Exception e) {
throw new SQLException("Failed to clean up client resources.", e);
}
}
+ private boolean hasCatalog() {
+ return !Strings.isNullOrEmpty(catalog);
Review Comment:
I think an empty string catalog would definitely be odd. I updated the logic
in Builder and added some tests to show the behaviour with various catalog
strings. It behaves as I would expect. @lidavidm lets see if that matches your
thinking also.
--
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]