stevelorddremio commented on code in PR #42035:
URL: https://github.com/apache/arrow/pull/42035#discussion_r1633598024
##########
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:
If I infer correctly, is this a readability issue?
--
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]