lidavidm commented on code in PR #42035:
URL: https://github.com/apache/arrow/pull/42035#discussion_r1634416715


##########
java/flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/client/ArrowFlightSqlClientHandler.java:
##########
@@ -254,6 +281,26 @@ public interface PreparedStatement extends AutoCloseable {
    * @return a new prepared statement.
    */
   public PreparedStatement prepare(final String query) {
+    if (setCatalogInSession) {

Review Comment:
   Is there some way to do this at initial connection time? (Some things may 
not prepare a statement but we'd still want the catalog/session to exist right? 
e.g. if someone connects and queries the catalog/metadata)



##########
java/flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/client/ArrowFlightSqlClientHandler.java:
##########
@@ -761,6 +812,16 @@ public Builder withCallOptions(final 
Collection<CallOption> options) {
       return this;
     }
 
+    /**
+     * Sets the catalog for this handler.
+     * @param catalog the catalog
+     * @return this instance.
+     */
+    public Builder withCatalog(final String catalog) {
+      this.catalog = catalog;

Review Comment:
   Why not store Optional<String> in the first place?



-- 
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