Jefffrey commented on code in PR #11180:
URL: https://github.com/apache/arrow-rs/pull/11180#discussion_r4166953284


##########
arrow-flight/src/bin/flight_sql_client.rs:
##########
@@ -398,12 +435,73 @@ fn setup_logging(args: LoggingArgs) -> Result<()> {
     Ok(())
 }
 
-async fn setup_client(args: ClientArgs) -> 
Result<FlightSqlServiceClient<Channel>> {
+/// Prefer a separate location, falling back to the original connection when 
permitted.
+fn select_endpoint_location<'a>(
+    locations: impl IntoIterator<Item = &'a str>,
+    tls: bool,
+) -> Result<Option<&'a str>> {
+    let mut reuse_connection = false;
+    let mut has_locations = false;
+    for uri in locations {
+        has_locations = true;
+        if uri.is_empty() || uri == REUSE_CONNECTION_URI {
+            reuse_connection = true;
+        } else if !tls || uri.starts_with("https://";) {

Review Comment:
   should we be looking at `grpc+tls` too? for reference:
   
   - https://arrow.apache.org/docs/format/Flight.html#location-uris



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